How can we pass data to child windows in WPF(interview question)
Loading
How can we pass data to child windows in WPF(interview question)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Anant VernekarPosted Aug 5, 2021, 5:15 PM
Hi,
There are two ways as below.
1. You can use the property "Tag", this property is a object type and you can set any complex object to this property.You can set this property when you call the chlid window from main window of xmal.cs file.
2. You can create your own dependency property and use to set the any complex object from main window to child window.
narayan singhPosted Aug 5, 2021, 5:55 PM