In WPF I often used such a construction:
SomeChildWindow dlg = new SomeChildWindow();
dlg.ShowDialog();
...
//child window is closed either by "this.DialogResult = true;" or just by "Close();"
//and in Parent window after Child window is closed we can use condition based on that
...
if (dlg.DialogResult == true)
{
//do something
}
But in Silverlight this approach doesn’t work.
What is the alternative in Silverlight for this? I mean how it is supposed to get a feedback from the child window in Silverlight?
Silverlight doesn’t support fully-modal dialogs, which prevents the traditional approach for checking dialog results. Instead, you need to assign an event handler to the dialog that will process the dialog result. The event is
ChildWindow.Closed.You can then obtain
ChildWindow.DialogResultin that event handler to handle it accordingly.