Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

wpf MessageBox result

MessageBoxResult result = MessageBox.Show("Would you like to greet the world with a "Hello, world"?", "My App", MessageBoxButton.YesNoCancel);
switch(result)
{
	case MessageBoxResult.Yes:
		MessageBox.Show("Hello to you too!", "My App");
		break;
	case MessageBoxResult.No:
		MessageBox.Show("Oh well, too bad!", "My App");
		break;
	case MessageBoxResult.Cancel:
		MessageBox.Show("Nevermind then...", "My App");
		break;
}
Source by wpf-tutorial.com #
 
PREVIOUS NEXT
Tagged: #wpf #MessageBox #result
ADD COMMENT
Topic
Name
6+2 =