title: C# WPF Disable the exit/close button
body: <p>Is it possible to disable the close button in a WPF form?
  How can I disable the close button?</p>
  
  <p>I have been searching around and found the solution below. But that works only in Windows Form!</p>
  
  <pre><code>private void Form1_FormClosing(object sender, FormClosingEventArgs e)
  {
        e.Cancel = true;
  }
  </code></pre>