I have a WPF application which calls a dialog using the ShowDialog method and then sets the e.NewObject of the GridView event to the newly created row. Everything works very well, however I am attempting to change the ShowDialog calls to remove the synchronous actions. This is to get the code working in an XBap environment and to get it closer to Silverlight if a port is needed.
I am however baffled as to how to do this without blocking the UI thread to wait for the dialog information.
This is basically what I am doing now:
This is what I would like to do
I am however baffled as to how to do this without blocking the UI thread to wait for the dialog information.
This is basically what I am doing now:
RadWindow NewWindow =
new
RadWindow();
NewWindow.ShowDialog();
e.NewObject = NewWindow.NewRow;
This is what I would like to do
RadWindow NewWindow =
new
RadWindow();
NewWindow.Closed +=
delegate
{
e.NewObject = NewWindow.NewRow;
};
NewWindow.Show();