Creating modal dialogs
Modal dialogs are also common components in LOB (Line Of Business) applications and management applications. That is to say, a pop-up window that blocks the rest of the application appears. Once the user has completed the pertinent application, he or she can close it and the application unblocks.
ChildWindow is the implementation of a modal dialog in Silverlight.
Example of modal dialogs
We will continue with the previous example, now adding a ChildWindow control. Also, we will make the modal window host the same content as the main window, adding the UserControl we previously created. Finally, we will communicate with the main page using the modal control. To do so, we will copy the values we entered in the form of the modal window to the form of the main page, as shown in the following screenshot:
To create a ChildWindow, carry out the following steps:
On the Views folder, right-click and select Add | New Item.
Choose the option Silverlight Child Window and name it MyDialogView...