Sunday, June 26, 2011

WPF ShowDialog return value





void MyWPFWindow_Closing(object sender, CancelEventArgs e)
{
DialogResult = true; // or false based on your requirement
}

//Usage
MyWPFWindow wnd = new MyWPFWindow();
bool retvalue = wnd.ShowDialog();




No comments:

Post a Comment