Users Pricing

forum

home / developersection / forums / disable the exit/close button in c# wpf.

Disable the exit/close button in C# WPF.

Anonymous User 14980 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;
}

I am a content writter !


1 Answers