SelectorAutomationPeer
SelectorAutomationPeer
SelectorAutomationPeer
SelectorAutomationPeer
Class
Definition
A base class that provides a Microsoft UI Automation peer implementation for types that derive from Selector.
public : class SelectorAutomationPeer : ItemsControlAutomationPeer, ISelectorAutomationPeer, ISelectionProviderpublic class SelectorAutomationPeer : ItemsControlAutomationPeer, ISelectorAutomationPeer, ISelectionProviderPublic Class SelectorAutomationPeer Inherits ItemsControlAutomationPeer Implements ISelectorAutomationPeer, ISelectionProvider// This API is not available in Javascript.
- Inheritance
-
FrameworkElementAutomationPeerFrameworkElementAutomationPeerFrameworkElementAutomationPeerFrameworkElementAutomationPeerItemsControlAutomationPeerItemsControlAutomationPeerItemsControlAutomationPeerItemsControlAutomationPeerSelectorAutomationPeerSelectorAutomationPeerSelectorAutomationPeerSelectorAutomationPeer
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Inherited Members
Inherited methods
Inherited properties
Remarks
The Windows Runtime Selector class creates a new SelectorAutomationPeer as part of internal logic that checks for listeners of certain automation events. Selector doesn't have an OnCreateAutomationPeer that automatically hooks up the peer on creation, because Selector is usually a base class.
Selector has several derived classes such as ListBox, which have template support and practical implementations of some important functionality. Make sure that you really want to derive from the base class. If you're sure you want to derive from Selector, directly, derive your automation peer from SelectorAutomationPeer and override OnCreateAutomationPeer so that it returns your custom peer.
Default peer implementation and overrides in SelectorAutomationPeer
SelectorAutomationPeer has overrides of Core methods such that the associated AutomationPeer methods provide peer-specific information to a Microsoft UI Automation client.
- GetPattern reports that the peer provides pattern support for PatternInterface.Selection (ISelectionProvider ). The base ItemsControlAutomationPeer reports support for PatternInterface.ItemContainer (IItemContainerProvider ).
- GetClassName is not implemented. Make sure to provide an implementation that returns your class name.
- GetAutomationControlType returns AutomationControlType.List. This peer raises selection-related automation events on behalf of its owner class.
The peer also has other behaviors that are provided by the base FrameworkElementAutomationPeer class. For more info, see "Base implementation in FrameworkElementAutomationPeer" section of Custom automation peers.
SelectorAutomationPeer derived classes
SelectorAutomationPeer is the parent class for these classes:
Constructors
SelectorAutomationPeer(Selector) SelectorAutomationPeer(Selector) SelectorAutomationPeer(Selector) SelectorAutomationPeer(Selector)
Initializes a new instance of the SelectorAutomationPeer class.
public : SelectorAutomationPeer(Selector owner)public SelectorAutomationPeer(Selector owner)Public Sub New(owner As Selector)// This API is not available in Javascript.
Properties
CanSelectMultiple CanSelectMultiple CanSelectMultiple CanSelectMultiple
Gets a value that indicates whether the Microsoft UI Automation provider allows more than one child element to be selected concurrently.
public : PlatForm::Boolean CanSelectMultiple { get; }public bool CanSelectMultiple { get; }Public ReadOnly Property CanSelectMultiple As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
true if multiple selection is allowed; otherwise, false.
IsSelectionRequired IsSelectionRequired IsSelectionRequired IsSelectionRequired
Gets a value that indicates whether the Microsoft UI Automation provider requires at least one child element to be selected.
public : PlatForm::Boolean IsSelectionRequired { get; }public bool IsSelectionRequired { get; }Public ReadOnly Property IsSelectionRequired As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
true if selection is required; otherwise, false.
Methods
GetSelection() GetSelection() GetSelection() GetSelection()
Retrieves a Microsoft UI Automation provider for each child element that is selected.
public : IRawElementProviderSimple[] GetSelection()public IRawElementProviderSimple[] GetSelection()Public Function GetSelection() As IRawElementProviderSimple[]// This API is not available in Javascript.
A generic list of Microsoft UI Automation providers.