Search
 
SCRIPT & CODE EXAMPLE
 

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);
            }
Comment

c# messagebox yes no "wpf"

// This one for WPF

if (MessageBox.Show("Close Application?", "Question", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
{
  //do no stuff
}
else
{
  //do yes stuff
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: C# check if is first run 
Csharp :: transfer ownership photon2 
Csharp :: delete all dir content c# 
Csharp :: object to mouse unity 
Csharp :: time.timescale 
Csharp :: how refresh just one table in laravel by terminal 
Csharp :: newtonsoft json conditionally ignore property 
Csharp :: unity access phone camera 
Csharp :: change textbox text color c# 
Csharp :: c# implicit operator 
Csharp :: how to add reference to rigidbody 2d 
Csharp :: list string to int c# 
Csharp :: unity print name of button when click on it 
Csharp :: c# connect to mongodb 
Csharp :: unity making a coroutine wait until another coroutine is done 
Csharp :: c# string to hex 
Csharp :: model in bootsrap 4 
Csharp :: how to get the position of a camera in unity 
Csharp :: merge point of two list 
Csharp :: c# find one object in list where 
Csharp :: convert int to short c# 
Csharp :: dotnet ef migrations to folder 
Csharp :: c# timer 
Csharp :: c# read file current directory 
Csharp :: unity 2d player move 
Csharp :: c# write variable in string 
Csharp :: loading screen unity 
Csharp :: remove comma from string c# 
Csharp :: c# minus days from datetime 
Csharp :: get layermask from gameobject layer unity 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =