Clyde Eisenbeis

Clyde Eisenbeis

  • 1.7k
  • 63
  • 11.8k

How do I override the the dialog box corner "X"? - Continued

Mar 8 2024 11:53 AM

The original post - c-sharpcorner.com/forums/how-do-i-override-the-corner-quotxquot-so-the-dialog-box-does-not-close. 

Commonly clicking the "X" in the corner of a dialog box closes the dialog box.  How do I override the corner "X" so the dialog box does not close?  See snipboard.io/kJZbzs.jpg.

public partial class dlgNumbers : Window
{
//------------------------------
public dlgNumbers()
{
    InitializeComponent();
}
//------------------------------

To clarify further, I have a button that closes the dialog box, but the "X" in the corner should not close the dialog box.

Another option is to hide the "X" in the corner.

What do I mdify in the responses to the original post?


Answers (2)