-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Automation.Peers.SelectorAutomationPeer |
winrt class |
A base class that provides a Microsoft UI Automation peer implementation for types that derive from Selector.
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.
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 is the parent class for these classes:
Selector, ItemsControlAutomationPeer, IItemContainerProvider, ISelectionProvider, Custom automation peers