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

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -