語言

Automation 類別

定義

包含 使用者介面自動化 客戶端應用程式的方法與欄位。

public ref class Automation abstract sealed
public static class Automation
type Automation = class
Public Class Automation
繼承
Automation

欄位

名稱 Description
ContentViewCondition

代表 使用者介面自動化 樹的預設視圖,僅包含可包含內容的 使用者介面自動化 元素。

ControlViewCondition

代表 使用者介面自動化 樹的預設視圖,僅包含控件的 使用者介面自動化 元素。

RawViewCondition

代表包含所有 使用者介面自動化 元素的預設 使用者介面自動化 樹視圖。

方法

名稱 Description
AddAutomationEventHandler(AutomationEvent, AutomationElement, TreeScope, AutomationEventHandler)

註冊一個處理 使用者介面自動化 事件的方法。

AddAutomationFocusChangedEventHandler(AutomationFocusChangedEventHandler)

註冊一個能處理焦點變更事件的方法。

AddAutomationPropertyChangedEventHandler(AutomationElement, TreeScope, AutomationPropertyChangedEventHandler, AutomationProperty[])

註冊一個方法,能處理屬性變更事件。

AddStructureChangedEventHandler(AutomationElement, TreeScope, StructureChangedEventHandler)

暫存處理結構變更事件的方法。

Compare(AutomationElement, AutomationElement)

比較兩個 使用者介面自動化 元素,若兩者指向同一 UI 元素,則回傳 true。

Compare(Int32[], Int32[])

比較包含執行時識別碼(ID)的兩個整數陣列,以判斷其內容是否相同。

PatternName(AutomationPattern)

取得指定控制模式的名稱。

PropertyName(AutomationProperty)

取得指定的 使用者介面自動化 屬性名稱。

RemoveAllEventHandlers()

移除所有註冊的 使用者介面自動化 事件處理程式。

RemoveAutomationEventHandler(AutomationEvent, AutomationElement, AutomationEventHandler)

移除指定的 UI 自動化事件處理器。

RemoveAutomationFocusChangedEventHandler(AutomationFocusChangedEventHandler)

移除指定的焦點變更事件處理程序。

RemoveAutomationPropertyChangedEventHandler(AutomationElement, AutomationPropertyChangedEventHandler)

移除指定的屬性變更事件處理程序。

RemoveStructureChangedEventHandler(AutomationElement, StructureChangedEventHandler)

移除指定的結構變更事件處理程序。

適用於