what is this window.Closing += Window_Closing;

Posted by rameshbergu-10345 under C# on 5/21/2011 | Points: 10 | Views : 2113 | Status : [Member] | Replies : 4
what is this window.Closing += Window_Closing;?


ideally what we are doing here?
why it is?

tell me one scenario where we use

thanks in advance




Responses

Posted by: T.saravanan on: 5/21/2011 [Member] [MVP] Silver | Points: 25

Up
0
Down
I think you ask about window closing event.This event will fire if close the current window means at the time we can call any function.
Refer this link you get an idea..
http://www.java2s.com/Tutorial/CSharp/0470__Windows-Presentation-Foundation/CreateWindowandaddwindowclosingeventhandler.htm


Thanks,
T.Saravanan

rameshbergu-10345, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Susanthampy on: 5/24/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi,

Refer this link,

http://download.oracle.com/javase/tutorial/uiswing/events/windowlistener.html

Regards,
Susan

rameshbergu-10345, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ndebata on: 5/25/2011 [Member] Starter | Points: 25

Up
0
Down
Hi

Window.Closing event is fired just before the window is closed.
As a CancelEventHandler it has the provision to stop the closing by writing e.Cancel=true.

This event is used when you want to do some operation ( either saome validation or save etc. you ask for a confimation aslo before closing ) just before closing a window form.

Please take a look at this
http://msdn.microsoft.com/en-us/library/system.windows.window.closing.aspx

Thanks,
Debata

rameshbergu-10345, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nithadeepak on: 5/25/2011 [Member] Bronze | Points: 25

Up
0
Down
http://www.codeproject.com/KB/WPF/WindowClosingBehavior.aspx

Nitha Deepak

rameshbergu-10345, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response