1

How to disable close button WPF ? i don't want to hide , i just want disable close button for the window

Is the any logic to disable close button ?

Ragavan
  • 2,984
  • 5
  • 22
  • 24

1 Answers1

1

You can code event, and it stop when you close button. May be i speed English not good, but you see code OK.

    in wpf this event called Closing :
    public Window4()
    {
        InitializeComponent();
        this.Closing += new System.ComponentModel.CancelEventHandler(Window4_Closing);
    }
    void Window4_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    {
        e.Cancel = true;
    }
B.Syal
  • 69
  • 2
  • 5