Show / Hide Table of Contents

Class AutomationPeer

Provides a base class that exposes an automation peer for an associated class to UI Automation.

Inheritance
System.Object
DependencyObject
AutomationPeer
FrameworkElementAutomationPeer
Inherited Members
DependencyObject.GetValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, Object)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.SetValue(DependencyPropertyKey, Object)
DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Dispatcher
DependencyObject.INTERNAL_OnAttachedToVisualTree()
DependencyObject.INTERNAL_OnDetachedFromVisualTree()
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CheckAccess()
DependencyObject.GetAnimationBaseValue(DependencyProperty)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Automation.Peers
Assembly: OpenSilver.dll
Syntax
public abstract class AutomationPeer : DependencyObject, IDependencyObject

Constructors

| Improve this Doc View Source

AutomationPeer()

Provides initialization for base class values when they are called by the constructor of a derived class.

Declaration
protected AutomationPeer()

Properties

| Improve this Doc View Source

EventsSource

Gets or sets an AutomationPeer that is reported to the automation client as a source for all the events that come from this AutomationPeer.

Declaration
[NotImplemented]
public AutomationPeer EventsSource { get; set; }
Property Value
Type Description
AutomationPeer

The AutomationPeer that is the source of events.

Methods

| Improve this Doc View Source

GetAcceleratorKey()

Gets the accelerator key combination for the object that is associated with the UI Automation peer.

Declaration
public string GetAcceleratorKey()
Returns
Type Description
System.String

The accelerator key combination hint string.

| Improve this Doc View Source

GetAcceleratorKeyCore()

When overridden in a derived class, is called by GetAcceleratorKey().

Declaration
protected abstract string GetAcceleratorKeyCore()
Returns
Type Description
System.String

The accelerator key.

| Improve this Doc View Source

GetAccessKey()

Gets the access key for the object that is associated with the automation peer.

Declaration
public string GetAccessKey()
Returns
Type Description
System.String

The access key.

| Improve this Doc View Source

GetAccessKeyCore()

When overridden in a derived class, is called by GetAccessKey().

Declaration
protected abstract string GetAccessKeyCore()
Returns
Type Description
System.String

The access key.

| Improve this Doc View Source

GetAutomationControlType()

Gets the control type for the object that is associated with the UI Automation peer.

Declaration
public AutomationControlType GetAutomationControlType()
Returns
Type Description
AutomationControlType

The control type, as a value of the enumeration.

| Improve this Doc View Source

GetAutomationControlTypeCore()

When overridden in a derived class, is called by GetAutomationControlType().

Declaration
protected abstract AutomationControlType GetAutomationControlTypeCore()
Returns
Type Description
AutomationControlType

The control type, as a value of the enumeration.

| Improve this Doc View Source

GetAutomationId()

Gets the System.Windows.Automation.AutomationProperties.AutomationId of the object that is associated with the automation peer.

Declaration
public string GetAutomationId()
Returns
Type Description
System.String

The automation identifier.

| Improve this Doc View Source

GetAutomationIdCore()

When overridden in a derived class, is called by GetAutomationId().

Declaration
protected abstract string GetAutomationIdCore()
Returns
Type Description
System.String

The automation identifier.

| Improve this Doc View Source

GetBoundingRectangle()

Gets the Rect object that represents the screen coordinates of the element that is associated with the automation peer.

Declaration
public Rect GetBoundingRectangle()
Returns
Type Description
Rect

The bounding rectangle.

| Improve this Doc View Source

GetBoundingRectangleCore()

When overridden in a derived class, is called by GetBoundingRectangle().

Declaration
protected abstract Rect GetBoundingRectangleCore()
Returns
Type Description
Rect

The bounding rectangle.

| Improve this Doc View Source

GetChildren()

Gets the collection of child elements that are represented in the UI Automation tree as immediate child elements of the automation peer.

Declaration
public List<AutomationPeer> GetChildren()
Returns
Type Description
System.Collections.Generic.List<AutomationPeer>

The collection of child elements.

| Improve this Doc View Source

GetChildrenCore()

When overridden in a derived class, is called by GetChildren().

Declaration
protected abstract List<AutomationPeer> GetChildrenCore()
Returns
Type Description
System.Collections.Generic.List<AutomationPeer>

The collection of child elements.

| Improve this Doc View Source

GetClassName()

Gets the name of the control class that is associated with the peer.

Declaration
public string GetClassName()
Returns
Type Description
System.String

The class name of the associated control class.

| Improve this Doc View Source

GetClassNameCore()

When overridden in a derived class, is called by GetClassName().

Declaration
protected abstract string GetClassNameCore()
Returns
Type Description
System.String

The class name of the related control class.

| Improve this Doc View Source

GetClickablePoint()

Gets a Point on the object that is associated with the automation peer that responds to a mouse click.

Declaration
public Point GetClickablePoint()
Returns
Type Description
Point

A point in the clickable area of the element.

| Improve this Doc View Source

GetClickablePointCore()

When overridden in a derived class, is called by GetClickablePoint().

Declaration
protected abstract Point GetClickablePointCore()
Returns
Type Description
Point

A point within the clickable area of the element.

| Improve this Doc View Source

GetHelpText()

Gets text that describes the functionality of the control that is associated with the automation peer.

Declaration
public string GetHelpText()
Returns
Type Description
System.String

The help text.

| Improve this Doc View Source

GetHelpTextCore()

When overridden in a derived class, is called by GetHelpText().

Declaration
protected abstract string GetHelpTextCore()
Returns
Type Description
System.String

The help text.

| Improve this Doc View Source

GetItemStatus()

Gets text that conveys the visual status of the object that is associated with this automation peer.

Declaration
public string GetItemStatus()
Returns
Type Description
System.String

The item status.

| Improve this Doc View Source

GetItemStatusCore()

When overridden in a derived class, is called by GetItemStatus().

Declaration
protected abstract string GetItemStatusCore()
Returns
Type Description
System.String

The item status.

| Improve this Doc View Source

GetItemType()

Gets a string that describes what kind of item an element represents.

Declaration
public string GetItemType()
Returns
Type Description
System.String

The kind of item.

| Improve this Doc View Source

GetItemTypeCore()

When overridden in a derived class, is called by GetItemType().

Declaration
protected abstract string GetItemTypeCore()
Returns
Type Description
System.String

The kind of item.

| Improve this Doc View Source

GetLabeledBy()

Gets the AutomationPeer for the UIElement that is targeted to the element.

Declaration
public AutomationPeer GetLabeledBy()
Returns
Type Description
AutomationPeer

The AutomationPeer for the element that is targeted by the UIElement.

| Improve this Doc View Source

GetLabeledByCore()

When overridden in a derived class, is called by GetLabeledBy().

Declaration
protected abstract AutomationPeer GetLabeledByCore()
Returns
Type Description
AutomationPeer

The AutomationPeer for the element that is targeted by the UIElement.

| Improve this Doc View Source

GetLocalizedControlType()

Gets a localized string that represents the control type, for the control that is associated with this automation peer. The localized string parallels a AutomationControlType value.

Declaration
public string GetLocalizedControlType()
Returns
Type Description
System.String

A string that reports the localized type of the associated control.

| Improve this Doc View Source

GetLocalizedControlTypeCore()

When overridden in a derived class, is called by GetLocalizedControlType().

Declaration
protected abstract string GetLocalizedControlTypeCore()
Returns
Type Description
System.String

A string that reports the localized type of the associated control.

| Improve this Doc View Source

GetName()

Gets the value that the automation peer reports as the UI Automation Name for the associated control.

Declaration
public string GetName()
Returns
Type Description
System.String

The value to report as the UI Automation Name.

| Improve this Doc View Source

GetNameCore()

When overridden in a derived class, is called by GetName().

Declaration
protected abstract string GetNameCore()
Returns
Type Description
System.String

The name.

| Improve this Doc View Source

GetOrientation()

Gets a value that indicates the explicit control orientation, if any.

Declaration
public AutomationOrientation GetOrientation()
Returns
Type Description
AutomationOrientation

The orientation of the control as a value of the enumeration.

| Improve this Doc View Source

GetOrientationCore()

When overridden in a derived class, is called by GetOrientation().

Declaration
protected abstract AutomationOrientation GetOrientationCore()
Returns
Type Description
AutomationOrientation

The orientation of the control.

| Improve this Doc View Source

GetParent()

Gets the AutomationPeer that is the parent of this AutomationPeer.

Declaration
public AutomationPeer GetParent()
Returns
Type Description
AutomationPeer

The parent automation peer.

| Improve this Doc View Source

GetPattern(PatternInterface)

When overridden in a derived class, gets an object that supports the requested pattern, based on PatternInterface input and the peer's implementation of known patterns.

Declaration
public abstract object GetPattern(PatternInterface patternInterface)
Parameters
Type Name Description
PatternInterface patternInterface

A value from the PatternInterface enumeration.

Returns
Type Description
System.Object

The object that implements the pattern interface; null if this peer does not support this interface.

| Improve this Doc View Source

HasKeyboardFocus()

Gets a value that indicates whether the object that is associated with this automation peer currently has keyboard focus.

Declaration
public bool HasKeyboardFocus()
Returns
Type Description
System.Boolean

true if the element has keyboard focus; otherwise, false.

| Improve this Doc View Source

HasKeyboardFocusCore()

When overridden in a derived class, is called by HasKeyboardFocus().

Declaration
protected abstract bool HasKeyboardFocusCore()
Returns
Type Description
System.Boolean

true if the element has keyboard focus; otherwise, false.

| Improve this Doc View Source

InvalidatePeer()

Triggers recalculation of the main properties of the AutomationPeer and raises the System.ComponentModel.INotifyPropertyChanged.PropertyChanged notification to the automation client if the properties have changed.

Declaration
[NotImplemented]
public void InvalidatePeer()
| Improve this Doc View Source

IsContentElement()

Gets a value that indicates whether the object that is associated with this automation peer contains data that is presented to the user.

Declaration
public bool IsContentElement()
Returns
Type Description
System.Boolean

true if the element is a content element; otherwise, false.

| Improve this Doc View Source

IsContentElementCore()

When overridden in a derived class, is called by IsContentElement().

Declaration
protected abstract bool IsContentElementCore()
Returns
Type Description
System.Boolean

true if the element is a content element; otherwise, false.

| Improve this Doc View Source

IsControlElement()

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 GUI.

Declaration
public bool IsControlElement()
Returns
Type Description
System.Boolean

true if the element is a control; otherwise, false.

| Improve this Doc View Source

IsControlElementCore()

When overridden in a derived class, is called by IsControlElement().

Declaration
protected abstract bool IsControlElementCore()
Returns
Type Description
System.Boolean

true if the element is a control; otherwise, false.

| Improve this Doc View Source

IsEnabled()

Gets a value that indicates whether the element associated with this automation peer supports interaction.

Declaration
public bool IsEnabled()
Returns
Type Description
System.Boolean

true if the element supports interaction; otherwise, false.

| Improve this Doc View Source

IsEnabledCore()

When overridden in a derived class, is called by IsEnabled().

Declaration
protected abstract bool IsEnabledCore()
Returns
Type Description
System.Boolean

true if the automation peer can receive and send events; otherwise, false.

| Improve this Doc View Source

IsKeyboardFocusable()

Gets a value that indicates whether the element can accept keyboard focus.

Declaration
public bool IsKeyboardFocusable()
Returns
Type Description
System.Boolean

true if the element can accept keyboard focus; otherwise, false.

| Improve this Doc View Source

IsKeyboardFocusableCore()

When overridden in a derived class, is called by IsKeyboardFocusable().

Declaration
protected abstract bool IsKeyboardFocusableCore()
Returns
Type Description
System.Boolean

true if the element can accept keyboard focus; otherwise, false.

| Improve this Doc View Source

IsOffscreen()

Gets a value that indicates whether an element is off the screen.

Declaration
public bool IsOffscreen()
Returns
Type Description
System.Boolean

true if the element is not on the screen; otherwise, false.

| Improve this Doc View Source

IsOffscreenCore()

When overridden in a derived class, is called by IsOffscreen().

Declaration
protected abstract bool IsOffscreenCore()
Returns
Type Description
System.Boolean

true if the element is not on the screen; otherwise, false.

| Improve this Doc View Source

IsPassword()

Gets a value that indicates whether the element contains sensitive content.

Declaration
public bool IsPassword()
Returns
Type Description
System.Boolean

true if the element contains sensitive content such as a password; otherwise, false.

| Improve this Doc View Source

IsPasswordCore()

When overridden in a derived class, is called by IsPassword().

Declaration
protected abstract bool IsPasswordCore()
Returns
Type Description
System.Boolean

true if the element contains sensitive content; otherwise, false.

| Improve this Doc View Source

IsRequiredForForm()

Gets a value that indicates whether the object that is associated with this peer must be completed on a form.

Declaration
public bool IsRequiredForForm()
Returns
Type Description
System.Boolean

true if the element must be completed; otherwise, false.

| Improve this Doc View Source

IsRequiredForFormCore()

When overridden in a derived class, is called by IsRequiredForForm().

Declaration
protected abstract bool IsRequiredForFormCore()
Returns
Type Description
System.Boolean

true if the element must be completed; otherwise, false.

| Improve this Doc View Source

ListenerExists(AutomationEvents)

Gets a value that indicates whether UI Automation is listening for the specified event.

Declaration
[NotImplemented]
public static bool ListenerExists(AutomationEvents eventId)
Parameters
Type Name Description
AutomationEvents eventId

One of the enumeration values.

Returns
Type Description
System.Boolean

true if UI Automation is listening for the specified event; otherwise, false.

| Improve this Doc View Source

PeerFromProvider(IRawElementProviderSimple)

Gets an AutomationPeer for the specified IRawElementProviderSimple proxy.

Declaration
protected AutomationPeer PeerFromProvider(IRawElementProviderSimple provider)
Parameters
Type Name Description
IRawElementProviderSimple provider

The class that implements IRawElementProviderSimple.

Returns
Type Description
AutomationPeer

The AutomationPeer for the specified IRawElementProviderSimple proxy.

| Improve this Doc View Source

ProviderFromPeer(AutomationPeer)

Gets the IRawElementProviderSimple proxy for the specified AutomationPeer.

Declaration
protected IRawElementProviderSimple ProviderFromPeer(AutomationPeer peer)
Parameters
Type Name Description
AutomationPeer peer

The automation peer.

Returns
Type Description
IRawElementProviderSimple

The proxy.

| Improve this Doc View Source

RaiseAutomationEvent(AutomationEvents)

Raises an automation event.

Declaration
[NotImplemented]
public void RaiseAutomationEvent(AutomationEvents eventId)
Parameters
Type Name Description
AutomationEvents eventId

The event identifier for the event to raise, as a value of the enumeration. See AutomationEvents.

| Improve this Doc View Source

RaisePropertyChangedEvent(AutomationProperty, Object, Object)

Raises an event to notify the automation client of a changed property value.

Declaration
[NotImplemented]
public void RaisePropertyChangedEvent(AutomationProperty property, object oldValue, object newValue)
Parameters
Type Name Description
AutomationProperty property

The property that changed.

System.Object oldValue

The previous value of the property.

System.Object newValue

The new value of the property.

| Improve this Doc View Source

SetFocus()

Sets the keyboard focus on the object that is associated with this automation peer.

Declaration
public void SetFocus()
| Improve this Doc View Source

SetFocusCore()

When overridden in a derived class, is called by SetFocus().

Declaration
protected abstract void SetFocusCore()

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestorsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualChildren(DependencyObject)
VisualTreeExtensions.GetVisualChildrenAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualDescendants(DependencyObject)
VisualTreeExtensions.GetVisualDescendantsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualSiblings(DependencyObject)
VisualTreeExtensions.GetVisualSiblingsAndSelf(DependencyObject)
  • Improve this Doc
  • View Source