Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

wpf yes no message box exit

var response = MessageBox.Show("Do you really want to exit?", "Exiting...",
                                      MessageBoxButton.YesNo, MessageBoxImage.Exclamation);
            if (response == MessageBoxResult.No)
            {
                e.Cancel = true;
            }
            else
            {
                Environment.Exit(0);
            }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #wpf #message #box #exit
ADD COMMENT
Topic
Name
3+2 =