Class FrameworkElementAutomationPeer
Exposes FrameworkElement types (including controls) to UI automation.
Inheritance
Inherited Members
Namespace: System.Windows.Automation.Peers
Assembly: OpenSilver.dll
Syntax
public class FrameworkElementAutomationPeer : AutomationPeer, IDependencyObject
Constructors
| Improve this Doc View SourceFrameworkElementAutomationPeer(FrameworkElement)
Initializes a new instance of the FrameworkElementAutomationPeer class.
Declaration
public FrameworkElementAutomationPeer(FrameworkElement owner)
Parameters
Type | Name | Description |
---|---|---|
FrameworkElement | owner | The FrameworkElement that is associated with this FrameworkElementAutomationPeer. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Properties
| Improve this Doc View SourceOwner
Gets the UIElement that is associated with this FrameworkElementAutomationPeer.
Declaration
public UIElement Owner { get; }
Property Value
Type | Description |
---|---|
UIElement | The element that owns this peer class. |
Methods
| Improve this Doc View SourceCreatePeerForElement(UIElement)
Creates a FrameworkElementAutomationPeer for the specified UIElement.
Declaration
public static AutomationPeer CreatePeerForElement(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The UIElement that is associated with this FrameworkElementAutomationPeer. |
Returns
Type | Description |
---|---|
AutomationPeer | The FrameworkElementAutomationPeer for the specified UIElement. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
FromElement(UIElement)
Returns the FrameworkElementAutomationPeer for the specified UIElement.
Declaration
public static AutomationPeer FromElement(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The UIElement that is associated with this FrameworkElementAutomationPeer. |
Returns
Type | Description |
---|---|
AutomationPeer | The FrameworkElementAutomationPeer, or null if the FrameworkElementAutomationPeer was not created by the CreatePeerForElement(UIElement) method. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
GetAcceleratorKeyCore()
Returns the accelerator key for the UIElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetAcceleratorKey().
Declaration
protected override string GetAcceleratorKeyCore()
Returns
Type | Description |
---|---|
System.String | The System.Windows.Automation.AutomationProperties.AcceleratorKey that is returned by GetAcceleratorKey(DependencyObject). |
Overrides
| Improve this Doc View SourceGetAccessKeyCore()
Returns the access key for the UIElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetAccessKey().
Declaration
protected override string GetAccessKeyCore()
Returns
Type | Description |
---|---|
System.String | The access key for the element that is associated with this FrameworkElementAutomationPeer. |
Overrides
| Improve this Doc View SourceGetAutomationControlTypeCore()
Returns the control type for the UIElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetAutomationControlType().
Declaration
protected override AutomationControlType GetAutomationControlTypeCore()
Returns
Type | Description |
---|---|
AutomationControlType | A value of the enumeration. |
Overrides
| Improve this Doc View SourceGetAutomationIdCore()
Returns the string that uniquely identifies the FrameworkElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetAutomationId().
Declaration
protected override string GetAutomationIdCore()
Returns
Type | Description |
---|---|
System.String | The automation identifier for the element associated with the FrameworkElementAutomationPeer, or System.String.Empty if there is no automation identifier. |
Overrides
| Improve this Doc View SourceGetBoundingRectangleCore()
Returns the Rect that represents the bounding rectangle of the UIElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetBoundingRectangle().
Declaration
[NotImplemented]
protected override Rect GetBoundingRectangleCore()
Returns
Type | Description |
---|---|
Rect | The Rect that contains the coordinates of the element. |
Overrides
| Improve this Doc View SourceGetChildrenCore()
Returns the collection of child elements of the UIElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetChildren().
Declaration
protected override List<AutomationPeer> GetChildrenCore()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<AutomationPeer> | A list of child AutomationPeer elements. |
Overrides
| Improve this Doc View SourceGetClassNameCore()
Returns the name of the UIElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetClassName().
Declaration
protected override string GetClassNameCore()
Returns
Type | Description |
---|---|
System.String | The name of the owner type that is associated with this FrameworkElementAutomationPeer. See "Notes for Inheritors". |
Overrides
Remarks
Notes to Inheritors
The return value for this method in the FrameworkElementAutomationPeer implementation comes from an internal property store, and it returns an empty string. Specific subclasses generally override this method again and return the class name of the owner type for the automation peer. There are two general patterns: return a string that is coded into the implementation, for example "Button"; call Owner.GetType().Name. The latter approach is appropriate if your peer is otherwise suitable for use on subclasses of its primary owner control type. In this case the dynamic value for ClassName saves the control subclasser from having to re-implement that aspect of the automation peer.
GetClickablePointCore()
Returns a Point that represents the clickable space that is on the UIElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetClickablePoint().
Declaration
[NotImplemented]
protected override Point GetClickablePointCore()
Returns
Type | Description |
---|---|
Point | The Point on the element that allows a click. |
Overrides
| Improve this Doc View SourceGetHelpTextCore()
Returns the string that describes the functionality of the FrameworkElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetHelpText().
Declaration
protected override string GetHelpTextCore()
Returns
Type | Description |
---|---|
System.String | The help text, or System.String.Empty if there is no help text. |
Overrides
| Improve this Doc View SourceGetItemStatusCore()
Returns a string that communicates the visual status of the UIElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetItemStatus().
Declaration
protected override string GetItemStatusCore()
Returns
Type | Description |
---|---|
System.String | The string that contains the System.Windows.Automation.AutomationProperties.ItemStatus that is returned by GetItemStatus(DependencyObject). |
Overrides
| Improve this Doc View SourceGetItemTypeCore()
Returns a human-readable string that contains the item type that the UIElement for this FrameworkElementAutomationPeer represents. This method is called by GetItemType().
Declaration
protected override string GetItemTypeCore()
Returns
Type | Description |
---|---|
System.String | The string that contains the System.Windows.Automation.AutomationProperties.ItemType that is returned by GetItemType(DependencyObject). |
Overrides
| Improve this Doc View SourceGetLabeledByCore()
Returns the AutomationPeer for the UIElement that targets the FrameworkElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetLabeledBy().
Declaration
protected override AutomationPeer GetLabeledByCore()
Returns
Type | Description |
---|---|
AutomationPeer | The AutomationPeer for the element that is targeted by the UIElement. |
Overrides
| Improve this Doc View SourceGetLocalizedControlTypeCore()
Returns a localized human-readable string that identifies a control type. The control type is for the owner type that is associated with this FrameworkElementAutomationPeer. This method is called by GetLocalizedControlType().
Declaration
protected override string GetLocalizedControlTypeCore()
Returns
Type | Description |
---|---|
System.String | A localized string that contains the type name of the owner control. |
Overrides
| Improve this Doc View SourceGetNameCore()
Returns the UI Automation Name from the element that is associated with this FrameworkElementAutomationPeer. This method is called by GetName().
Declaration
protected override string GetNameCore()
Returns
Type | Description |
---|---|
System.String | The UI Automation Name from the element that is associated with this automation peer. |
Overrides
| Improve this Doc View SourceGetOrientationCore()
Returns a value that indicates whether the element that is associated with this FrameworkElementAutomationPeer is laid out in a specific direction. This method is called by GetOrientation().
Declaration
protected override AutomationOrientation GetOrientationCore()
Returns
Type | Description |
---|---|
AutomationOrientation | The None enumeration value. |
Overrides
| Improve this Doc View SourceGetPattern(PatternInterface)
Returns an object that supports the requested pattern, based on the patterns supported by this FrameworkElementAutomationPeer.
Declaration
public override object GetPattern(PatternInterface patternInterface)
Parameters
Type | Name | Description |
---|---|---|
PatternInterface | patternInterface | One of the enumeration values. |
Returns
Type | Description |
---|---|
System.Object | See Remarks. |
Overrides
Remarks
The return value for this method in the FrameworkElementAutomationPeer implementation returns null in all cases. Override this method to report a specific pattern.
HasKeyboardFocusCore()
Returns a value that indicates whether the UIElement that is associated with this FrameworkElementAutomationPeer currently has keyboard input focus. This method is called by HasKeyboardFocus().
Declaration
[NotImplemented]
protected override bool HasKeyboardFocusCore()
Returns
Type | Description |
---|---|
System.Boolean | true if the element has keyboard input focus; otherwise, false. |
Overrides
| Improve this Doc View SourceIsContentElementCore()
Returns a value that indicates whether the element that is associated with this FrameworkElementAutomationPeer is an element that contains data that is presented to the user. This method is called by IsContentElement().
Declaration
protected override bool IsContentElementCore()
Returns
Type | Description |
---|---|
System.Boolean | true if the element contains data for the user to read; otherwise, false. |
Overrides
| Improve this Doc View SourceIsControlElementCore()
Returns a value that indicates whether the object that is associated with this FrameworkElementAutomationPeer is understood by the end user as interactive. Optionally, the user might understand the object as contributing to the logical structure of the control in the GUI. This method is called by IsControlElement().
Declaration
protected override bool IsControlElementCore()
Returns
Type | Description |
---|---|
System.Boolean | true if the object is interactive; otherwise, false. |
Overrides
| Improve this Doc View SourceIsEnabledCore()
Returns a value that indicates whether the UIElement that is associated with this FrameworkElementAutomationPeer is enabled. This method is called by IsEnabled().
Declaration
protected override bool IsEnabledCore()
Returns
Type | Description |
---|---|
System.Boolean | true if the element is enabled; otherwise, false. |
Overrides
| Improve this Doc View SourceIsKeyboardFocusableCore()
Returns a value that indicates whether the element that is associated with this FrameworkElementAutomationPeer can accept keyboard focus. This method is called by IsKeyboardFocusable().
Declaration
protected override bool IsKeyboardFocusableCore()
Returns
Type | Description |
---|---|
System.Boolean | true if the element is focusable by the keyboard; otherwise, false. |
Overrides
| Improve this Doc View SourceIsOffscreenCore()
Returns a value that indicates whether the UIElement that is associated with this FrameworkElementAutomationPeer is off the screen. This method is called by IsOffscreen().
Declaration
protected override bool IsOffscreenCore()
Returns
Type | Description |
---|---|
System.Boolean | true if the element is not on the screen; otherwise, false. |
Overrides
| Improve this Doc View SourceIsPasswordCore()
Returns a value that indicates whether the element that is associated with this FrameworkElementAutomationPeer contains protected content. This method is called by IsPassword().
Declaration
protected override bool IsPasswordCore()
Returns
Type | Description |
---|---|
System.Boolean | true if the element contains sensitive content; otherwise, false. |
Overrides
| Improve this Doc View SourceIsRequiredForFormCore()
Returns a value that indicates whether the element that is associated with this FrameworkElementAutomationPeer is required to be completed on a form. This method is called by IsRequiredForForm().
Declaration
protected override bool IsRequiredForFormCore()
Returns
Type | Description |
---|---|
System.Boolean | The value that is returned by GetIsRequiredForForm(DependencyObject), if the value is set; otherwise, false. |
Overrides
| Improve this Doc View SourceSetFocusCore()
Sets the keyboard input focus on the element that is associated with this FrameworkElementAutomationPeer. This method is called by SetFocus().
Declaration
protected override void SetFocusCore()