AutomationPeer AutomationPeer AutomationPeer AutomationPeer Class

定義

提供將元素公開至使用者介面自動化的基底類別。Provides a base class that exposes an element to UI Automation.

public ref class AutomationPeer abstract : System::Windows::Threading::DispatcherObject
public abstract class AutomationPeer : System.Windows.Threading.DispatcherObject
type AutomationPeer = class
    inherit DispatcherObject
Public MustInherit Class AutomationPeer
Inherits DispatcherObject
繼承
衍生

備註

查詢UI 自動化UI Automation Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)應用程式的根目錄時,根項目會傳回該元素的UI 自動化UI Automation對等專案。When UI 自動化UI Automation queries the root of a Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) application about an element, the root returns the UI 自動化UI Automation peer for that element. 對等也會回應UI 自動化UI Automation其對應元素的查詢。The peer also responds to UI 自動化UI Automation queries about its corresponding element.

建構函式

AutomationPeer() AutomationPeer() AutomationPeer() AutomationPeer()

當衍生類別的建構函式呼叫基本類別值時,提供基本類別值的初始設定。Provides initialization for base class values when they are called by the constructor of a derived class.

屬性

Dispatcher Dispatcher Dispatcher Dispatcher

取得與這個 Dispatcher 關聯的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(Inherited from DispatcherObject)
EventsSource EventsSource EventsSource EventsSource

取得或設定 AutomationPeer,其報告至自動化用戶端,作為所有來自此 AutomationPeer 的事件來源。Gets or sets an AutomationPeer that is reported to the automation client as a source for all the events that come from this AutomationPeer.

IsHwndHost IsHwndHost IsHwndHost IsHwndHost

取得值,這個值表示與這個 AutomationPeer 相關聯的項目是否裝載 Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) 中的 hwndsGets a value that indicates whether the element that is associated with this AutomationPeer hosts hwnds in Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF).

方法

CheckAccess() CheckAccess() CheckAccess() CheckAccess()

判斷呼叫的執行是否可以存取這個 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetAcceleratorKey() GetAcceleratorKey() GetAcceleratorKey() GetAcceleratorKey()

取得與 UI 自動化UI Automation 對等相關聯之元素的快速鍵組合。Gets the accelerator key combinations for the element that is associated with the UI 自動化UI Automation peer.

GetAcceleratorKeyCore() GetAcceleratorKeyCore() GetAcceleratorKeyCore() GetAcceleratorKeyCore()

在衍生類別中覆寫時,被 GetAcceleratorKey() 呼叫。When overridden in a derived class, is called by GetAcceleratorKey().

GetAccessKey() GetAccessKey() GetAccessKey() GetAccessKey()

取得與自動化對等相關聯之項目的存取金鑰。Gets the access key for the element that is associated with the automation peer.

GetAccessKeyCore() GetAccessKeyCore() GetAccessKeyCore() GetAccessKeyCore()

在衍生類別中覆寫時,被 GetAccessKey() 呼叫。When overridden in a derived class, is called by GetAccessKey().

GetAutomationControlType() GetAutomationControlType() GetAutomationControlType() GetAutomationControlType()

取得與 UI 自動化UI Automation 對等相關聯之元素的控制項類型。Gets the control type for the element that is associated with the UI 自動化UI Automation peer.

GetAutomationControlTypeCore() GetAutomationControlTypeCore() GetAutomationControlTypeCore() GetAutomationControlTypeCore()

在衍生類別中覆寫時,被 GetAutomationControlType() 呼叫。When overridden in a derived class, is called by GetAutomationControlType().

GetAutomationId() GetAutomationId() GetAutomationId() GetAutomationId()

取得與自動化對等個體相關聯項目的 AutomationIdGets the AutomationId of the element that is associated with the automation peer.

GetAutomationIdCore() GetAutomationIdCore() GetAutomationIdCore() GetAutomationIdCore()

在衍生類別中覆寫時,被 GetAutomationId() 呼叫。When overridden in a derived class, is called by GetAutomationId().

GetBoundingRectangle() GetBoundingRectangle() GetBoundingRectangle() GetBoundingRectangle()

取得 Rect 物件,這個物件表示與自動化對等個體關聯之項目的螢幕座標。Gets the Rect object that represents the screen coordinates of the element that is associated with the automation peer.

GetBoundingRectangleCore() GetBoundingRectangleCore() GetBoundingRectangleCore() GetBoundingRectangleCore()

在衍生類別中覆寫時,被 GetBoundingRectangle() 呼叫。When overridden in a derived class, is called by GetBoundingRectangle().

GetChildren() GetChildren() GetChildren() GetChildren()

取得 GetChildren() 項目的集合,這些項目在使用者介面自動化樹狀目錄中是表示為自動化對等個體的直系子項目。Gets the collection of GetChildren() elements that are represented in the UI Automation tree as immediate child elements of the automation peer.

GetChildrenCore() GetChildrenCore() GetChildrenCore() GetChildrenCore()

在衍生類別中覆寫時,被 GetChildren() 呼叫。When overridden in a derived class, is called by GetChildren().

GetClassName() GetClassName() GetClassName() GetClassName()

取得與 AutomationControlType 一起使用的名稱,以區分此 AutomationPeer 所表示的控制項。Gets a name that is used with AutomationControlType, to differentiate the control that is represented by this AutomationPeer.

GetClassNameCore() GetClassNameCore() GetClassNameCore() GetClassNameCore()

在衍生類別中覆寫時,被 GetClassName() 呼叫。When overridden in a derived class, is called by GetClassName().

GetClickablePoint() GetClickablePoint() GetClickablePoint() GetClickablePoint()

取得與自動化對等個體關聯之項目上的 Point,該對等個體回應滑鼠點選動作。Gets a Point on the element that is associated with the automation peer that responds to a mouse click.

GetClickablePointCore() GetClickablePointCore() GetClickablePointCore() GetClickablePointCore()

在衍生類別中覆寫時,被 GetClickablePoint() 呼叫。When overridden in a derived class, is called by GetClickablePoint().

GetControlledPeers() GetControlledPeers() GetControlledPeers() GetControlledPeers()

提供使用者介面自動化受此 AutomationPeer 影響或控制的項目清單。Provides UI Automation with a list of elements affected or controlled by this AutomationPeer.

GetControlledPeersCore() GetControlledPeersCore() GetControlledPeersCore() GetControlledPeersCore()

在衍生類別中覆寫時,提供 UI 自動化及受此 AutomationPeer 影響或控制的元素清單。When overridden in a derived class, provides UI Automation with a list of elements affected or controlled by this AutomationPeer.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetHelpText() GetHelpText() GetHelpText() GetHelpText()

取得文字,這個文字描述與自動化對等個體關聯之控制項的功能。Gets text that describes the functionality of the control that is associated with the automation peer.

GetHelpTextCore() GetHelpTextCore() GetHelpTextCore() GetHelpTextCore()

在衍生類別中覆寫時,被 GetHelpText() 呼叫。When overridden in a derived class, is called by GetHelpText().

GetHostRawElementProviderCore() GetHostRawElementProviderCore() GetHostRawElementProviderCore() GetHostRawElementProviderCore()

告知 UI 自動化UI AutomationUI 自動化UI Automation 樹狀結構中的何處放置 Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) 項目所主控的 hwndTells UI 自動化UI Automation where in the UI 自動化UI Automation tree to place the hwnd being hosted by a Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) element.

GetItemStatus() GetItemStatus() GetItemStatus() GetItemStatus()

取得文字,這個文字表示與此自動化對等個體關聯之項目的視覺化狀態。Gets text that conveys the visual status of the element that is associated with this automation peer.

GetItemStatusCore() GetItemStatusCore() GetItemStatusCore() GetItemStatusCore()

在衍生類別中覆寫時,被 GetItemStatus() 呼叫。When overridden in a derived class, is called by GetItemStatus().

GetItemType() GetItemType() GetItemType() GetItemType()

取得字串,這個字串描述物件所表示的項目類型。Gets a string that describes what kind of item an object represents.

GetItemTypeCore() GetItemTypeCore() GetItemTypeCore() GetItemTypeCore()

在衍生類別中覆寫時,被 GetItemType() 呼叫。When overridden in a derived class, is called by GetItemType().

GetLabeledBy() GetLabeledBy() GetLabeledBy() GetLabeledBy()

取得以該項目為目標之 LabelAutomationPeerGets the AutomationPeer for the Label that is targeted to the element.

GetLabeledByCore() GetLabeledByCore() GetLabeledByCore() GetLabeledByCore()

在衍生類別中覆寫時,被 GetLabeledBy() 呼叫。When overridden in a derived class, is called by GetLabeledBy().

GetLiveSetting() GetLiveSetting() GetLiveSetting() GetLiveSetting()

取得與此 Automation Peer 建立關聯的即時區域通知特性。Gets the notification characteristics of a live region that is associated with this automation peer.

GetLiveSettingCore() GetLiveSettingCore() GetLiveSettingCore() GetLiveSettingCore()

於衍生類別中覆寫時,傳回即時區域的通知特性。When overridden in a derived class, returns the notification characteristics of a live region. GetLiveSetting() 方法呼叫。Called by the GetLiveSetting() method.

GetLocalizedControlType() GetLocalizedControlType() GetLocalizedControlType() GetLocalizedControlType()

取得人們可解讀的當地語系化字串,這個字串表示與這個自動化對等個體相關聯控制項的 AutomationControlType 值。Gets a human-readable localized string that represents the AutomationControlType value for the control that is associated with this automation peer.

GetLocalizedControlTypeCore() GetLocalizedControlTypeCore() GetLocalizedControlTypeCore() GetLocalizedControlTypeCore()

在衍生類別中覆寫時,被 GetLocalizedControlType() 呼叫。When overridden in a derived class, is called by GetLocalizedControlType().

GetName() GetName() GetName() GetName()

取得文字,這個文字描述與此自動化對等個體關聯的項目。Gets text that describes the element that is associated with this automation peer.

GetNameCore() GetNameCore() GetNameCore() GetNameCore()

在衍生類別中覆寫時,被 GetName() 呼叫。When overridden in a derived class, is called by GetName().

GetOrientation() GetOrientation() GetOrientation() GetOrientation()

取得值,這個值表示明確的控制項方向 (若有的話)。Gets a value that indicates the explicit control orientation, if any.

GetOrientationCore() GetOrientationCore() GetOrientationCore() GetOrientationCore()

在衍生類別中覆寫時,被 GetOrientation() 呼叫。When overridden in a derived class, is called by GetOrientation().

GetParent() GetParent() GetParent() GetParent()

取得 AutomationPeer,它是這個 AutomationPeer 的父代。Gets the AutomationPeer that is the parent of this AutomationPeer.

GetPattern(PatternInterface) GetPattern(PatternInterface) GetPattern(PatternInterface) GetPattern(PatternInterface)

在衍生類別中覆寫時,取得與指定之 PatternInterface 相關聯的控制項模式。When overridden in a derived class, gets the control pattern that is associated with the specified PatternInterface.

GetPeerFromPoint(Point) GetPeerFromPoint(Point) GetPeerFromPoint(Point) GetPeerFromPoint(Point)

從指定之點取得 AutomationPeerGets an AutomationPeer from the specified point.

GetPeerFromPointCore(Point) GetPeerFromPointCore(Point) GetPeerFromPointCore(Point) GetPeerFromPointCore(Point)

在衍生類別中覆寫時,從 GetPeerFromPoint(Point) 呼叫。When overridden in a derived class, is called from GetPeerFromPoint(Point).

GetPositionInSet() GetPositionInSet() GetPositionInSet() GetPositionInSet()

嘗試取得 PositionInSet 屬性的值。Attempts to get the value of the PositionInSet property.

GetPositionInSetCore() GetPositionInSetCore() GetPositionInSetCore() GetPositionInSetCore()

在衍生類別中覆寫時,提供使用者介面自動化描述此項目在群組或集合中佔用位置之以一為起始的整數值。When overridden in a derived class, provides UI Automation with a one-based integer value that describes the position this element occupies in a group or set.

GetSizeOfSet() GetSizeOfSet() GetSizeOfSet() GetSizeOfSet()

嘗試取得 SizeOfSet 屬性的值。Attempts to get the value of the SizeOfSet property.

GetSizeOfSetCore() GetSizeOfSetCore() GetSizeOfSetCore() GetSizeOfSetCore()

在衍生類別中覆寫時,提供 UI 自動化及此元素所屬群組或集合的大小。When overridden in a derived class, provides UI Automation with the size of the group or set that this element belongs to.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
HasKeyboardFocus() HasKeyboardFocus() HasKeyboardFocus() HasKeyboardFocus()

取得值,這個值表示與這個自動化對等個體相關聯的項目目前是否有鍵盤焦點。Gets a value that indicates whether the element that is associated with this automation peer currently has keyboard focus.

HasKeyboardFocusCore() HasKeyboardFocusCore() HasKeyboardFocusCore() HasKeyboardFocusCore()

在衍生類別中覆寫時,被 HasKeyboardFocus() 呼叫。When overridden in a derived class, is called by HasKeyboardFocus().

InvalidatePeer() InvalidatePeer() InvalidatePeer() InvalidatePeer()

觸發重新計算 AutomationPeer 的主要屬性,並在屬性變更時引發對自動化用戶端的 PropertyChanged 通知。Triggers recalculation of the main properties of the AutomationPeer and raises the PropertyChanged notification to the Automation Client if the properties changed.

IsContentElement() IsContentElement() IsContentElement() IsContentElement()

取得值,這個值表示與此 Automation Peer 相關聯的項目是否包含呈現給使用者的資料。Gets a value that indicates whether the element that is associated with this automation peer contains data that is presented to the user.

IsContentElementCore() IsContentElementCore() IsContentElementCore() IsContentElementCore()

在衍生類別中覆寫時,被 IsContentElement() 呼叫。When overridden in a derived class, is called by IsContentElement().

IsControlElement() IsControlElement() IsControlElement() IsControlElement()

取得值,這個值表示項目會由使用者辨識為互動式,還是做為 GUIGUI 中控制項的邏輯結構。Gets a value that indicates whether the element is understood by the user as interactive or as contributing to the logical structure of the control in the GUIGUI.

IsControlElementCore() IsControlElementCore() IsControlElementCore() IsControlElementCore()

在衍生類別中覆寫時,被 IsControlElement() 呼叫。When overridden in a derived class, is called by IsControlElement().

IsEnabled() IsEnabled() IsEnabled() IsEnabled()

取得值,這個值表示與此自動化對等個體關聯的項目是否支援互動。Gets a value that indicates whether the element associated with this automation peer supports interaction.

IsEnabledCore() IsEnabledCore() IsEnabledCore() IsEnabledCore()

在衍生類別中覆寫時,被 IsEnabled() 呼叫。When overridden in a derived class, is called by IsEnabled().

IsKeyboardFocusable() IsKeyboardFocusable() IsKeyboardFocusable() IsKeyboardFocusable()

取得值,這個值表示項目是否可以接受鍵盤焦點。Gets a value that indicates whether the element can accept keyboard focus.

IsKeyboardFocusableCore() IsKeyboardFocusableCore() IsKeyboardFocusableCore() IsKeyboardFocusableCore()

在衍生類別中覆寫時,被 IsKeyboardFocusable() 呼叫。When overridden in a derived class, is called by IsKeyboardFocusable().

IsOffscreen() IsOffscreen() IsOffscreen() IsOffscreen()

取得值,這個值表示項目是否不在螢幕上。Gets a value that indicates whether an element is off the screen.

IsOffscreenCore() IsOffscreenCore() IsOffscreenCore() IsOffscreenCore()

在衍生類別中覆寫時,被 IsOffscreen() 呼叫。When overridden in a derived class, is called by IsOffscreen().

IsPassword() IsPassword() IsPassword() IsPassword()

取得值,這個值表示項目是否包含敏感性內容。Gets a value that indicates whether the element contains sensitive content.

IsPasswordCore() IsPasswordCore() IsPasswordCore() IsPasswordCore()

在衍生類別中覆寫時,被 IsPassword() 呼叫。When overridden in a derived class, is called by IsPassword().

IsRequiredForForm() IsRequiredForForm() IsRequiredForForm() IsRequiredForForm()

取得值,這個值表示與此對等個體關聯的項目在表單上是否為必填項。Gets a value that indicates whether the element that is associated with this peer must be completed on a form.

IsRequiredForFormCore() IsRequiredForFormCore() IsRequiredForFormCore() IsRequiredForFormCore()

在衍生類別中覆寫時,被 IsRequiredForForm() 呼叫。When overridden in a derived class, is called by IsRequiredForForm().

ListenerExists(AutomationEvents) ListenerExists(AutomationEvents) ListenerExists(AutomationEvents) ListenerExists(AutomationEvents)

取得值,這個值表示 UI 自動化UI Automation是否正在接聽指定的事件。Gets a value that indicates whether UI 自動化UI Automation is listening for the specified event.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
PeerFromProvider(IRawElementProviderSimple) PeerFromProvider(IRawElementProviderSimple) PeerFromProvider(IRawElementProviderSimple) PeerFromProvider(IRawElementProviderSimple)

取得指定之 AutomationPeer Proxy 的 IRawElementProviderSimpleGets an AutomationPeer for the specified IRawElementProviderSimple proxy.

ProviderFromPeer(AutomationPeer) ProviderFromPeer(AutomationPeer) ProviderFromPeer(AutomationPeer) ProviderFromPeer(AutomationPeer)

取得所指定之 IRawElementProviderSimpleAutomationPeerGets the IRawElementProviderSimple for the specified AutomationPeer.

RaiseAsyncContentLoadedEvent(AsyncContentLoadedEventArgs) RaiseAsyncContentLoadedEvent(AsyncContentLoadedEventArgs) RaiseAsyncContentLoadedEvent(AsyncContentLoadedEventArgs) RaiseAsyncContentLoadedEvent(AsyncContentLoadedEventArgs)

AutomationPeer 呼叫以引發 AsyncContentLoadedEvent 事件。Called by the AutomationPeer to raise the AsyncContentLoadedEvent event.

RaiseAutomationEvent(AutomationEvents) RaiseAutomationEvent(AutomationEvents) RaiseAutomationEvent(AutomationEvents) RaiseAutomationEvent(AutomationEvents)

引發自動化事件。Raises an automation event.

RaisePropertyChangedEvent(AutomationProperty, Object, Object) RaisePropertyChangedEvent(AutomationProperty, Object, Object) RaisePropertyChangedEvent(AutomationProperty, Object, Object) RaisePropertyChangedEvent(AutomationProperty, Object, Object)

引發事件,通知自動化用戶端已變更屬性值。Raises an event to notify the automation client of a changed property value.

ResetChildrenCache() ResetChildrenCache() ResetChildrenCache() ResetChildrenCache()

呼叫 GetChildrenCore(),以同步方式重設子項目的樹狀結構。Synchronously resets the tree of child elements by calling GetChildrenCore().

SetFocus() SetFocus() SetFocus() SetFocus()

對與此自動化對等個體關聯的項目設定鍵盤焦點。Sets the keyboard focus on the element that is associated with this automation peer.

SetFocusCore() SetFocusCore() SetFocusCore() SetFocusCore()

在衍生類別中覆寫時,被 SetFocus() 呼叫。When overridden in a derived class, is called by SetFocus().

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
VerifyAccess() VerifyAccess() VerifyAccess() VerifyAccess()

請強制執行可以存取這個 DispatcherObject 的呼叫執行緒。Enforces that the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)

適用於

另請參閱