Can I disable the close button in a WPF form? How to disable the close button?
I searched and found a solution below. But this only works on Windows Form!
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { e.Cancel = true; }
source share