forum

Home / DeveloperSection / Forums / Disable the exit/close button in C# WPF.

Disable the exit/close button in C# WPF.

Anonymous User 14015 19-Jul-2013

Is it possible to disable the close button in a WPF form? How can I disable the close button?

I have been searching around and found the solution below. But that works only in Windows Form!

private void Form1_FormClosing(object sender,
FormClosingEventArgs e)
{
      e.Cancel = true;
}

wpf wpf 
Updated on 19-Jul-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By