AutomationPeer.HasKeyboardFocusCore Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the peer's behavior when a Microsoft UI Automation client calls HasKeyboardFocus or an equivalent Microsoft UI Automation client API.
protected:
virtual bool HasKeyboardFocusCore() = HasKeyboardFocusCore;
bool HasKeyboardFocusCore();
protected virtual bool HasKeyboardFocusCore();
function hasKeyboardFocusCore()
Protected Overridable Function HasKeyboardFocusCore () As Boolean
Returns
bool
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.
Applies to
See also
Opinia
https://aka.ms/ContentUserFeedback.
Dostępne już wkrótce: W 2024 r. będziemy stopniowo wycofywać zgłoszenia z serwisu GitHub jako mechanizm przesyłania opinii na temat zawartości i zastępować go nowym systemem opinii. Aby uzyskać więcej informacji, sprawdź:Prześlij i wyświetl opinię dla