c# - WPF action befor exit -


on wpf want know when user press on x exit.

then want functions.

how can on wpf c#?

public partial class mainwindow {     public mainwindow()     {         initializecomponent();         this.closing += (sender, args) => ...; // occurs after x pressed. can cancel closure here.         this.closed += (sender, args) => ...; // occurs when window closed.     } } 

Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -