Child Window Overview
Silverlight 3 has a new template called ChildWindow. It is basically a user control (unlike a Popup you can edit its XAML), but it allows you to create modal windows for your application, such as dialogs.
To use this dialog, you just have to create a new instance of it and call its Show method. As this call is asynchronic, you need to handle the Closed event to know when the dialog interaction has finished.
The Quickstart’s scenario shows how to use the Event Aggregator to add funds of a particular customer, so what I did is add a confirmation dialog before adding the fund. After you select the customer and fund (both of them as in the original Quickstart) and click the Add button following dialog pops up:
As expected, if you click “Yes” the fund will be added, and if you click “No” or close the dialog it won’t.
Child Window Sample
This code is provided â€śAS ISâ€ť with no warranties, and confers no rights.
You can get the sample from here: ChildWindowSample.zip.