ModalDialog
Displaying a ModalDialog in Silverlight is simple, thanks to Karen Corby for providing a reusable class
you can download sample code for ModalDialog here
how to use it
copy the code for class into the project
Create a page(”ModalPage”) with the content we want to be displayed in ModalDialog
when it is time to display the dialog, all we need to do is add couple of lines of code
ModalDialog.Closed += new EventHandler<ModalDialogClosedEventArgs>(ModalDialog_Closed);
//”ModalPage” is the name of the page we created
ModalDialog.Show(new SolidColorBrush(Colors.LightGray), .5, new ModalPage());
void ModalDialog_Closed(object sender, ModalDialogClosedEventArgs e)
{
if (e.Result == DialogResult.OK)
//do something
else
//do something
}
screenshot?
Fernando Lopez Jr.
October 14, 2008