Automation.AddAutomationEventHandler メソッド

定義

UI オートメーションイベントを処理するメソッドを登録します。

public:
 static void AddAutomationEventHandler(System::Windows::Automation::AutomationEvent ^ eventId, System::Windows::Automation::AutomationElement ^ element, System::Windows::Automation::TreeScope scope, System::Windows::Automation::AutomationEventHandler ^ eventHandler);
public static void AddAutomationEventHandler(System.Windows.Automation.AutomationEvent eventId, System.Windows.Automation.AutomationElement element, System.Windows.Automation.TreeScope scope, System.Windows.Automation.AutomationEventHandler eventHandler);
static member AddAutomationEventHandler : System.Windows.Automation.AutomationEvent * System.Windows.Automation.AutomationElement * System.Windows.Automation.TreeScope * System.Windows.Automation.AutomationEventHandler -> unit
Public Shared Sub AddAutomationEventHandler (eventId As AutomationEvent, element As AutomationElement, scope As TreeScope, eventHandler As AutomationEventHandler)

パラメーター

eventId
AutomationEvent

メソッドが処理するイベントの識別子。

element
AutomationElement

イベント ハンドラーに関連付けるUI オートメーション要素。

scope
TreeScope

処理されるイベントのスコープ。つまり、要素自体上にあるか、その先祖と子孫上にあるか。

eventHandler
AutomationEventHandler

指定したイベントが発生したときに呼び出すメソッド。

注釈

GridPatternなどの一部のクラスは、クラスに固有のイベントを識別するフィールドを公開します。 AddAutomationEventHandler メソッドには、これらのイベントのハンドラーを登録できるメカニズムが用意されています。

eventHandlerには、メソッドのインスタンス、またはメソッドへの参照 (Visual Basic の AddressOf) を指定できます。

適用対象

こちらもご覧ください