Export (0) Print
Expand All
1 out of 3 rated this helpful - Rate this topic

AutomationPeer Class

Provides a base class that exposes an element to UI Automation. 

Namespace:  System.Windows.Automation.Peers
Assembly:  PresentationCore (in PresentationCore.dll)
[<AbstractClass>]
type AutomationPeer =  
    class
        inherit DispatcherObject
    end

The AutomationPeer type exposes the following members.

  NameDescription
Protected methodAutomationPeerProvides initialization for base class values when they are called by the constructor of a derived class.
Top
  NameDescription
Public propertyDispatcherGets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)
Public propertyEventsSourceGets or sets an AutomationPeer that is reported to the automation client as a source for all the events that come from this AutomationPeer.
Protected propertyIsHwndHostGets a value that indicates whether the element that is associated with this AutomationPeer hosts hwnds in Windows Presentation Foundation (WPF).
Top
  NameDescription
Public methodCheckAccessDetermines whether the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetAcceleratorKeyGets the accelerator key combinations for the element that is associated with the UI Automation peer. 
Protected methodGetAcceleratorKeyCoreWhen overridden in a derived class, is called by GetAcceleratorKey.
Public methodGetAccessKeyGets the access key for the element that is associated with the automation peer.
Protected methodGetAccessKeyCoreWhen overridden in a derived class, is called by GetAccessKey.
Public methodGetAutomationControlTypeGets the control type for the element that is associated with the UI Automation peer.
Protected methodGetAutomationControlTypeCoreWhen overridden in a derived class, is called by GetAutomationControlType.
Public methodGetAutomationIdGets the AutomationId of the element that is associated with the automation peer.
Protected methodGetAutomationIdCoreWhen overridden in a derived class, is called by GetAutomationId.
Public methodGetBoundingRectangleGets the Rect object that represents the screen coordinates of the element that is associated with the automation peer.
Protected methodGetBoundingRectangleCoreWhen overridden in a derived class, is called by GetBoundingRectangle.
Public methodGetChildrenGets the collection of GetChildren elements that are represented in the UI Automation tree as immediate child elements of the automation peer.
Protected methodGetChildrenCoreWhen overridden in a derived class, is called by GetChildren.
Public methodGetClassNameGets a name that is used with AutomationControlType, to differentiate the control that is represented by this AutomationPeer.
Protected methodGetClassNameCoreWhen overridden in a derived class, is called by GetClassName.
Public methodGetClickablePointGets a Point on the element that is associated with the automation peer that responds to a mouse click.
Protected methodGetClickablePointCoreWhen overridden in a derived class, is called by GetClickablePoint.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetHelpTextGets text that describes the functionality of the control that is associated with the automation peer.
Protected methodGetHelpTextCoreWhen overridden in a derived class, is called by GetHelpText.
Protected methodGetHostRawElementProviderCoreTells UI Automation where in the UI Automation tree to place the hwnd being hosted by a Windows Presentation Foundation (WPF) element.
Public methodGetItemStatusGets text that conveys the visual status of the element that is associated with this automation peer.
Protected methodGetItemStatusCoreWhen overridden in a derived class, is called by GetItemStatus.
Public methodGetItemTypeGets a string that describes what kind of item an object represents.
Protected methodGetItemTypeCoreWhen overridden in a derived class, is called by GetItemType.
Public methodGetLabeledByGets the AutomationPeer for the Label that is targeted to the element.
Protected methodGetLabeledByCoreWhen overridden in a derived class, is called by GetLabeledBy.
Public methodGetLocalizedControlTypeGets a human-readable localized string that represents the AutomationControlType value for the control that is associated with this automation peer.
Protected methodGetLocalizedControlTypeCoreWhen overridden in a derived class, is called by GetLocalizedControlType.
Public methodGetNameGets text that describes the element that is associated with this automation peer.
Protected methodGetNameCoreWhen overridden in a derived class, is called by GetName.
Public methodGetOrientationGets a value that indicates the explicit control orientation, if any.
Protected methodGetOrientationCoreWhen overridden in a derived class, is called by GetOrientation.
Public methodGetParentGets the AutomationPeer that is the parent of this AutomationPeer.
Public methodGetPatternWhen overridden in a derived class, gets the control pattern that is associated with the specified PatternInterface.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodHasKeyboardFocusGets a value that indicates whether the element that is associated with this automation peer currently has keyboard focus.
Protected methodHasKeyboardFocusCoreWhen overridden in a derived class, is called by HasKeyboardFocus.
Public methodInvalidatePeerTriggers recalculation of the main properties of the AutomationPeer and raises the PropertyChanged notification to the Automation Client if the properties changed.
Public methodIsContentElementGets a value that indicates whether the element that is associated with this automation peer contains data that is presented to the user.
Protected methodIsContentElementCoreWhen overridden in a derived class, is called by IsContentElement.
Public methodIsControlElementGets 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 GUI.
Protected methodIsControlElementCoreWhen overridden in a derived class, is called by IsControlElement.
Public methodIsEnabledGets a value that indicates whether the element associated with this automation peer supports interaction.
Protected methodIsEnabledCoreWhen overridden in a derived class, is called by IsEnabled.
Public methodIsKeyboardFocusableGets a value that indicates whether the element can accept keyboard focus.
Protected methodIsKeyboardFocusableCoreWhen overridden in a derived class, is called by IsKeyboardFocusable.
Public methodIsOffscreenGets a value that indicates whether an element is off the screen.
Protected methodIsOffscreenCoreWhen overridden in a derived class, is called by IsOffscreen.
Public methodIsPasswordGets a value that indicates whether the element contains sensitive content.
Protected methodIsPasswordCoreWhen overridden in a derived class, is called by IsPassword.
Public methodIsRequiredForFormGets a value that indicates whether the element that is associated with this peer must be completed on a form.
Protected methodIsRequiredForFormCoreWhen overridden in a derived class, is called by IsRequiredForForm.
Public methodStatic memberListenerExistsGets a value that indicates whether UI Automation is listening for the specified event. 
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodPeerFromProviderGets an AutomationPeer for the specified IRawElementProviderSimple proxy.
Protected methodProviderFromPeerGets the IRawElementProviderSimple for the specified AutomationPeer.
Public methodRaiseAsyncContentLoadedEventCalled by the AutomationPeer to raise the AsyncContentLoadedEvent event.
Public methodRaiseAutomationEventRaises an automation event.
Public methodRaisePropertyChangedEventRaises an event to notify the automation client of a changed property value.
Public methodResetChildrenCacheSynchronously resets the tree of child elements by calling GetChildrenCore.
Public methodSetFocusSets the keyboard focus on the element that is associated with this automation peer.
Protected methodSetFocusCoreWhen overridden in a derived class, is called by SetFocus.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodVerifyAccessEnforces that the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Top

When UI Automation queries the root of a Windows Presentation Foundation (WPF) application about an element, the root returns the UI Automation peer for that element. The peer also responds to UI Automation queries about its corresponding element.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.