In my projects (WPF) I use System.Windows.MessageBox
to show the user a confirmation dialog for operations that are critical, such as a delete-operation.
My problem is that if I specify as button value MessageBoxButton.YesNo
, the user cannot use the escape-key to cancel the operation. IMO this is one of the most annoying things, a program can do, showing a dialog without the possibility to cancel/close the dialog through the escape-key.
Other possibilities are MessageBoxButton.YesNoCancel
, but IMO this is confusing because it shows three buttons for only two operations . Or one can use MessageBox.OKCancel
, but this is IMO not clear enough. In my dialogs I want to ask the user if her really wants to execute the operation. And for this, a simple ok is not appropriate. A yes (I want) is much better than an ok (go on).
How do you handle this? Is it a non-topic or do you think as I do and have an own MessageBox-implementation or do you know a possibility to extend the System.Windows.MessageBox
-class?