Class AutomationPeer
Provides a base class that exposes an automation peer for an associated class to UI Automation.
Inherited Members
Namespace: System.Windows.Automation.Peers
Assembly: OpenSilver.dll
Syntax
public abstract class AutomationPeer : DependencyObject, IDependencyObject
Constructors
| Improve this Doc View SourceAutomationPeer()
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 SourceEventsSource
Gets or sets an Automation
Declaration
[NotImplemented]
public AutomationPeer EventsSource { get; set; }
Property Value
Type | Description |
---|---|
Automation |
The Automation |
Methods
| Improve this Doc View SourceGetAcceleratorKey()
Gets the accelerator key combination for the object that is associated with the UI Automation peer.
Declaration
public string GetAcceleratorKey()
Returns
Type | Description |
---|---|
System. |
The accelerator key combination hint string. |
GetAcceleratorKeyCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract string GetAcceleratorKeyCore()
Returns
Type | Description |
---|---|
System. |
The accelerator key. |
GetAccessKey()
Gets the access key for the object that is associated with the automation peer.
Declaration
public string GetAccessKey()
Returns
Type | Description |
---|---|
System. |
The access key. |
GetAccessKeyCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract string GetAccessKeyCore()
Returns
Type | Description |
---|---|
System. |
The access key. |
GetAutomationControlType()
Gets the control type for the object that is associated with the UI Automation peer.
Declaration
public AutomationControlType GetAutomationControlType()
Returns
Type | Description |
---|---|
Automation |
The control type, as a value of the enumeration. |
GetAutomationControlTypeCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract AutomationControlType GetAutomationControlTypeCore()
Returns
Type | Description |
---|---|
Automation |
The control type, as a value of the enumeration. |
GetAutomationId()
Gets the System.
Declaration
public string GetAutomationId()
Returns
Type | Description |
---|---|
System. |
The automation identifier. |
GetAutomationIdCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract string GetAutomationIdCore()
Returns
Type | Description |
---|---|
System. |
The automation identifier. |
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. |
GetBoundingRectangleCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract Rect GetBoundingRectangleCore()
Returns
Type | Description |
---|---|
Rect | The bounding rectangle. |
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. |
The collection of child elements. |
GetChildrenCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract List<AutomationPeer> GetChildrenCore()
Returns
Type | Description |
---|---|
System. |
The collection of child elements. |
GetClassName()
Gets the name of the control class that is associated with the peer.
Declaration
public string GetClassName()
Returns
Type | Description |
---|---|
System. |
The class name of the associated control class. |
GetClassNameCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract string GetClassNameCore()
Returns
Type | Description |
---|---|
System. |
The class name of the related control class. |
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. |
GetClickablePointCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract Point GetClickablePointCore()
Returns
Type | Description |
---|---|
Point | A point within the clickable area of the element. |
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. |
The help text. |
GetHelpTextCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract string GetHelpTextCore()
Returns
Type | Description |
---|---|
System. |
The help text. |
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. |
The item status. |
GetItemStatusCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract string GetItemStatusCore()
Returns
Type | Description |
---|---|
System. |
The item status. |
GetItemType()
Gets a string that describes what kind of item an element represents.
Declaration
public string GetItemType()
Returns
Type | Description |
---|---|
System. |
The kind of item. |
GetItemTypeCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract string GetItemTypeCore()
Returns
Type | Description |
---|---|
System. |
The kind of item. |
GetLabeledBy()
Gets the Automation
Declaration
public AutomationPeer GetLabeledBy()
Returns
Type | Description |
---|---|
Automation |
The Automation |
GetLabeledByCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract AutomationPeer GetLabeledByCore()
Returns
Type | Description |
---|---|
Automation |
The Automation |
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 Automation
Declaration
public string GetLocalizedControlType()
Returns
Type | Description |
---|---|
System. |
A string that reports the localized type of the associated control. |
GetLocalizedControlTypeCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract string GetLocalizedControlTypeCore()
Returns
Type | Description |
---|---|
System. |
A string that reports the localized type of the associated control. |
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. |
The value to report as the UI Automation Name. |
GetNameCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract string GetNameCore()
Returns
Type | Description |
---|---|
System. |
The name. |
GetOrientation()
Gets a value that indicates the explicit control orientation, if any.
Declaration
public AutomationOrientation GetOrientation()
Returns
Type | Description |
---|---|
Automation |
The orientation of the control as a value of the enumeration. |
GetOrientationCore()
When overridden in a derived class, is called by Get
Declaration
protected abstract AutomationOrientation GetOrientationCore()
Returns
Type | Description |
---|---|
Automation |
The orientation of the control. |
GetParent()
Gets the Automation
Declaration
public AutomationPeer GetParent()
Returns
Type | Description |
---|---|
Automation |
The parent automation peer. |
GetPattern(PatternInterface)
When overridden in a derived class, gets an object that supports the
requested pattern, based on Pattern
Declaration
public abstract object GetPattern(PatternInterface patternInterface)
Parameters
Type | Name | Description |
---|---|---|
Pattern |
patternInterface | A value from the Pattern |
Returns
Type | Description |
---|---|
System. |
The object that implements the pattern interface; null if this peer does not support this interface. |
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. |
true if the element has keyboard focus; otherwise, false. |
HasKeyboardFocusCore()
When overridden in a derived class, is called by Has
Declaration
protected abstract bool HasKeyboardFocusCore()
Returns
Type | Description |
---|---|
System. |
true if the element has keyboard focus; otherwise, false. |
InvalidatePeer()
Triggers recalculation of the main properties of the Automation
Declaration
[NotImplemented]
public void InvalidatePeer()
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. |
true if the element is a content element; otherwise, false. |
IsContentElementCore()
When overridden in a derived class, is called by Is
Declaration
protected abstract bool IsContentElementCore()
Returns
Type | Description |
---|---|
System. |
true if the element is a content element; otherwise, false. |
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. |
true if the element is a control; otherwise, false. |
IsControlElementCore()
When overridden in a derived class, is called by Is
Declaration
protected abstract bool IsControlElementCore()
Returns
Type | Description |
---|---|
System. |
true if the element is a control; otherwise, false. |
IsEnabled()
Gets a value that indicates whether the element associated with this automation peer supports interaction.
Declaration
public bool IsEnabled()
Returns
Type | Description |
---|---|
System. |
true if the element supports interaction; otherwise, false. |
IsEnabledCore()
When overridden in a derived class, is called by Is
Declaration
protected abstract bool IsEnabledCore()
Returns
Type | Description |
---|---|
System. |
true if the automation peer can receive and send events; otherwise, false. |
IsKeyboardFocusable()
Gets a value that indicates whether the element can accept keyboard focus.
Declaration
public bool IsKeyboardFocusable()
Returns
Type | Description |
---|---|
System. |
true if the element can accept keyboard focus; otherwise, false. |
IsKeyboardFocusableCore()
When overridden in a derived class, is called by Is
Declaration
protected abstract bool IsKeyboardFocusableCore()
Returns
Type | Description |
---|---|
System. |
true if the element can accept keyboard focus; otherwise, false. |
IsOffscreen()
Gets a value that indicates whether an element is off the screen.
Declaration
public bool IsOffscreen()
Returns
Type | Description |
---|---|
System. |
true if the element is not on the screen; otherwise, false. |
IsOffscreenCore()
When overridden in a derived class, is called by Is
Declaration
protected abstract bool IsOffscreenCore()
Returns
Type | Description |
---|---|
System. |
true if the element is not on the screen; otherwise, false. |
IsPassword()
Gets a value that indicates whether the element contains sensitive content.
Declaration
public bool IsPassword()
Returns
Type | Description |
---|---|
System. |
true if the element contains sensitive content such as a password; otherwise, false. |
IsPasswordCore()
When overridden in a derived class, is called by Is
Declaration
protected abstract bool IsPasswordCore()
Returns
Type | Description |
---|---|
System. |
true if the element contains sensitive content; otherwise, false. |
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. |
true if the element must be completed; otherwise, false. |
IsRequiredForFormCore()
When overridden in a derived class, is called by Is
Declaration
protected abstract bool IsRequiredForFormCore()
Returns
Type | Description |
---|---|
System. |
true if the element must be completed; otherwise, false. |
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 |
---|---|---|
Automation |
eventId | One of the enumeration values. |
Returns
Type | Description |
---|---|
System. |
true if UI Automation is listening for the specified event; otherwise, false. |
PeerFromProvider(IRawElementProviderSimple)
Gets an Automation
Declaration
protected AutomationPeer PeerFromProvider(IRawElementProviderSimple provider)
Parameters
Type | Name | Description |
---|---|---|
IRaw |
provider | The class that implements IRaw |
Returns
Type | Description |
---|---|
Automation |
The Automation |
ProviderFromPeer(AutomationPeer)
Gets the IRaw
Declaration
protected IRawElementProviderSimple ProviderFromPeer(AutomationPeer peer)
Parameters
Type | Name | Description |
---|---|---|
Automation |
peer | The automation peer. |
Returns
Type | Description |
---|---|
IRaw |
The proxy. |
RaiseAutomationEvent(AutomationEvents)
Raises an automation event.
Declaration
[NotImplemented]
public void RaiseAutomationEvent(AutomationEvents eventId)
Parameters
Type | Name | Description |
---|---|---|
Automation |
eventId | The event identifier for the event to raise, as a value of the enumeration. See
Automation |
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 |
---|---|---|
Automation |
property | The property that changed. |
System. |
oldValue | The previous value of the property. |
System. |
newValue | The new value of the property. |
SetFocus()
Sets the keyboard focus on the object that is associated with this automation peer.
Declaration
public void SetFocus()
SetFocusCore()
When overridden in a derived class, is called by Set
Declaration
protected abstract void SetFocusCore()