How to override onclose event on WPF?

前端 未结 2 1293
花落未央
花落未央 2020-12-20 17:15

I\'m trying to override the onclose event on WPF, this is my code so far:

protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
{
               


        
2条回答
  •  太阳男子
    2020-12-20 17:50

    You are asking it not to close by setting e.Cancel = true. Just don't do that.

提交回复
热议问题