-api-id | -api-type |
---|---|
T:Microsoft.UI.Xaml.Automation.Peers.HubSectionAutomationPeer |
winrt class |
Exposes HubSection types to Microsoft UI Automation.
The Windows Runtime HubSection class creates a new HubSectionAutomationPeer as its OnCreateAutomationPeer definition. Derive your automation peer from HubSectionAutomationPeer if you are deriving a custom class from HubSection 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.
HubSectionAutomationPeer has overrides of Core methods such that the associated AutomationPeer methods provide peer-specific information to a Microsoft UI Automation client.
- GetPattern reports no pattern support.
- GetClassName returns "HubSection".
- GetAutomationControlType returns AutomationControlType.ListItem.
- GetName attempts to get a string from the owner control's Header property. Otherwise, the framework peer behavior of using AutomationProperties.Name applies.
- GetChildren returns a set of peers where the peer for the Header is first. This is followed by peers for the content in HeaderTemplate. If IsHeaderInteractive is true for the section, there's also a peer representing the chevron glyph button that's added by templates. Then peers are included for the content being presented in the section. 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.
For Windows Phone 8.x apps, GetPattern reports support for the ScrollItem pattern, and implements the ScrollIntoView method for it.
FrameworkElementAutomationPeer, HubAutomationPeer, Hub, Custom automation peers