WindowClosedEventArgs 类

定义

包含有关关闭窗口时引发的事件的信息。Contains information about the event that is raised when a window is closed.

public ref class WindowClosedEventArgs sealed : System::Windows::Automation::AutomationEventArgs
public sealed class WindowClosedEventArgs : System.Windows.Automation.AutomationEventArgs
type WindowClosedEventArgs = class
    inherit AutomationEventArgs
Public NotInheritable Class WindowClosedEventArgs
Inherits AutomationEventArgs
继承
WindowClosedEventArgs

示例

有关示例代码,请参阅 GetRuntimeIdFor example code, see GetRuntimeId.

注解

若要订阅窗口关闭事件, 请调用AddAutomationEventHandler, WindowClosedEventArgsWindowClosedEventeventId参数中指定并提供UI 自动化UI Automation采用参数的事件处理程序。To subscribe to window-closed events, call AddAutomationEventHandler, specifying WindowClosedEvent in the eventId parameter and supplying an UI 自动化UI Automation event handler that takes a WindowClosedEventArgs parameter.

当应用程序收到窗口关闭事件时, 不能sender使用事件处理程序的参数获取有关已关闭窗口的信息, 因为相应UI 自动化UI Automation的元素不再有效。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 自动化UI Automation element is no longer valid.

构造函数

WindowClosedEventArgs(Int32[])

初始化 WindowClosedEventArgs 类的新实例。Initializes a new instance of the WindowClosedEventArgs class.

属性

EventId

获取事件标识符。Gets the event identifier.

(继承自 AutomationEventArgs)

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetRuntimeId()

检索与此事件关联的 UI 自动化UI Automation运行时 标识符 (ID)identifier (ID)Retrieves the UI 自动化UI Automation runtime 标识符 (ID)identifier (ID) associated with this event.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅