-api-id | -api-type |
---|---|
T:Microsoft.UI.Xaml.Automation.Peers.PasswordBoxAutomationPeer |
winrt class |
Exposes PasswordBox types to Microsoft UI Automation.
The Windows Runtime PasswordBox class creates a new PasswordBoxAutomationPeer as its OnCreateAutomationPeer definition. PasswordBox is sealed, so the normal scenario of deriving from the PasswordBox class and its existing peer isn't applicable to PasswordBoxAutomationPeer.
PasswordBoxAutomationPeer 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 "PasswordBox".
- GetAutomationControlType returns AutomationControlType.Edit.
- IsPassword returns true. An automation Name is not calculated for you for PasswordBox content. You should assign a value using the AutomationProperties.Name attached property.
Any value entered for a password is potentially sensitive information and is often handled differently from a normal edit box by assistive technology implementations. For example a screen reader might not read characters aloud when IsPassword returns true.
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, PasswordBox, Custom automation peers