WindowClosedEventArgs Class
Contains information about the event that is raised when a window is closed.
Assembly: UIAutomationTypes (in UIAutomationTypes.dll)
To subscribe to window-closed events, call AddAutomationEventHandler, specifying WindowClosedEvent in the eventId parameter and supplying an UI Automation event handler that takes a WindowClosedEventArgs parameter.
When your application receives a window-closed event, the sender parameter of the event handler cannot be used to obtain information about the window that has closed, because the corresponding UI Automation element is no longer valid.
For example code, see GetRuntimeId.
System.EventArgs
System.Windows.Automation.AutomationEventArgs
System.Windows.Automation.WindowClosedEventArgs
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.