-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Automation.Peers.ComboBoxAutomationPeer |
winrt class |
Exposes ComboBox types to Microsoft UI Automation.
The Windows Runtime ComboBox class creates a new ComboBoxAutomationPeer as its OnCreateAutomationPeer definition. Derive your automation peer from ComboBoxAutomationPeer if you are deriving a custom class from ComboBox and want to add automation support for additional features that you enabled in your custom class. Then override OnCreateAutomationPeer so that it returns your custom peer.
ComboBoxAutomationPeer 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 these patterns:
- PatternInterface.Value (IValueProvider)
- PatternInterface.Selection (ISelectionProvider)
- PatternInterface.ItemContainer (IItemContainerProvider)
- PatternInterface.ExpandCollapse (IExpandCollapseProvider) This is the accumulated pattern support from each of the peer base classes and ComboBoxAutomationPeer itself.
- GetClassName returns "ComboBox".
- GetAutomationControlType returns AutomationControlType.ComboBox.
- GetChildren provides peers for contained elements. See ComboBoxItemAutomationPeer. This peer has the base classes ItemsControlAutomationPeer and SelectorAutomationPeer and these peers also have behavior that isn't overridden by the notes above. For more info, see ItemsControlAutomationPeer and SelectorAutomationPeer.
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.
IsReadOnly and IsEnabled return a calculated value based on UI properties such as IsEnabled on the owner.
The peer can fire the automation events when ExpandCollapseState of the peer and owner control changes.
ComboBox, SelectorAutomationPeer, IItemContainerProvider, ISelectionProvider, IValueProvider, IExpandCollapseProvider, ItemsControlAutomationPeer, ComboBoxItemAutomationPeer, Custom automation peers