How can we pass data to child windows in WPF(interview question)
Best way to pass data to child window in wpf
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Anant VernekarRank #1,055 · 1.8K reputationPosted Aug 5, 2021, 1:15 PM EDT
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 singhRank #7,785 · 234 reputationPosted Aug 5, 2021, 1:55 PM EDT