Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.32 KB

automationpeer_haskeyboardfocuscore_1501023026.md

File metadata and controls

25 lines (17 loc) · 1.32 KB
-api-id -api-type
M:Windows.UI.Xaml.Automation.Peers.AutomationPeer.HasKeyboardFocusCore
winrt method

Windows.UI.Xaml.Automation.Peers.AutomationPeer.HasKeyboardFocusCore

-description

Provides the peer's behavior when a Microsoft UI Automation client calls HasKeyboardFocus or an equivalent Microsoft UI Automation client API.

-returns

true if the element has keyboard focus; otherwise, false.

-remarks

The standard implementation at the AutomationPeer level checks whether the owner has focus, and always returns false if the owner isn't focusable. FrameworkElementAutomationPeer expands this behavior somewhat because it adds awareness of owner characteristics that rely on the owner being a Control subclass. Test the existing return value in the peer that you are using or overriding and then override that behavior if necessary.

-examples

-see-also

FrameworkElementAutomationPeer, Custom automation peers, Accessibility