ModalDialog

Posted on April 3, 2008. Filed under: Silverlight | Tags: |

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
 }

Make a Comment

Make A Comment: ( 1 so far )

blockquote and a tags work here.

One Response to “ModalDialog”

RSS Feed for Lee’s corner Comments RSS Feed

screenshot?


Where's The Comment Form?

Liked it here?
Why not try sites on the blogroll...