I tried to use DialogResult
to check an Messagebox
's YesNoCancel. I'm using the following code which I don't see any problem with:
DialogResult dlgResult = MessageBox.Show(
"Save changes before closing?",
"Warning",
MessageBoxButton.YesNoCancel,
MessageBoxImage.Question);
But Visual Studio throws me error saying
'System.Windows.Window.DialogResult' is a 'property' but is used like a 'type'
MessageBoxResult
rather thanDialogResult
. – Karleen