canton7 / Stylet

A very lightweight but powerful ViewModel-First MVVM framework for WPF for .NET Framework and .NET Core, inspired by Caliburn.Micro.
MIT License
981 stars 143 forks source link

ShowMessageBox MessageBoxButtons.YesNo disabling the Esc key and Window "X" close functionality #317

Open canton7 opened 2 years ago

canton7 commented 2 years ago

Discussed in https://github.com/canton7/Stylet/discussions/309

Originally posted by **duners88** November 24, 2021 It would be nice if the MessageBoxButtons.YesNo parameter option disabled the Window close "X" and the ESC key functionality that closes the window. I use the YesNo enum value when I want to force the user to actively click something. I use the YesNoCancel if the user does not need to make a decision and can "opt out" or close the message without making a decision. Just a suggestion, I believe this is how the System.Windows.Forms.MessageBox class functions.