-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Automation.Peers.HubAutomationPeer |
winrt class |
Exposes Hub types to Microsoft UI Automation.
The Windows Runtime Hub class creates a new HubAutomationPeer as its OnCreateAutomationPeer definition. Derive your automation peer from HubAutomationPeer if you are deriving a custom class from Hub 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.
HubAutomationPeer 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.Scroll (IScrollProvider). This uses peer forwarding to get the peer from the ScrollViewer part that exists in the compositing for a Hub control. If the default template isn't being used and there is no ScrollViewer part, no pattern can be returned.
- GetClassName returns "Hub".
- GetAutomationControlType returns AutomationControlType.Group.
- 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, followed by a peer for each HubSection. 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.
FrameworkElementAutomationPeer, HubSectionAutomationPeer, Custom automation peers