WPF MessageBox

To create a WPF MessageBox use:

MessageBoxResult dialogResult = System.Windows.MessageBox.Show("Are you sure you wish to delete this?", "Delete Confirmation", System.Windows.MessageBoxButton.YesNo);
if (dialogResult == MessageBoxResult.Yes)
{
    System.Windows.MessageBox.Show("Delete operation Worked");
}
else
{
    System.Windows.MessageBox.Show("Delete operation Terminated");
}

Leave a Reply

Your email address will not be published. Required fields are marked *