WindowClosedEventArgs Class
TOC
Collapse the table of content
Expand the table of content

WindowClosedEventArgs Class

 

Contains information about the event that is raised when a window is closed.

Namespace:   System.Windows.Automation
Assembly:  UIAutomationTypes (in UIAutomationTypes.dll)

System.Object
  System.EventArgs
    System.Windows.Automation.AutomationEventArgs
      System.Windows.Automation.WindowClosedEventArgs

public sealed class WindowClosedEventArgs : AutomationEventArgs

NameDescription
System_CAPS_pubmethodWindowClosedEventArgs(Int32[])

Initializes a new instance of the WindowClosedEventArgs class.

NameDescription
System_CAPS_pubpropertyEventId

Gets the event identifier.(Inherited from AutomationEventArgs.)

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetRuntimeId()

Retrieves the UI Automation runtime identifier (ID) associated with this event.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

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.

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft