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