How to override default window close operation?

Try overriding OnClosing in Window.xaml. Cs private override void OnClosing( object sender, CancelEventArgs e ) { e. Cancel = true; //Do whatever you want here.. }.

This page should help. Closing can be handled to detect when a window is being closed (for example, when Close is called). Furthermore, Closing can be used to prevent a window from closing.To prevent a window from closing, you can set the Cancel property of the CancelEventArgs argument to true.

And If you want to show and hide a window multiple times during the lifetime of an application, and you don't want to reinstantiate the window each time you show it, you can handle the Closing event, cancel it, and call the Then, you can call Show on the same instance to reopen it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions