-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Automation.Peers.DatePickerAutomationPeer |
winrt class |
Exposes DatePicker types to Microsoft UI Automation.
The Windows Runtime DatePicker class creates a new DatePickerAutomationPeer as its OnCreateAutomationPeer definition. Derive your automation peer from DatePickerAutomationPeer if you are deriving a custom class from DatePicker 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.
DatePickerAutomationPeer has overrides of Core methods such that the associated AutomationPeer methods provide peer-specific information to a Microsoft UI Automation client.
- GetClassName returns "DatePicker".
- 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.
- GetPattern reports no pattern support. 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.