AutomationElement.HasKeyboardFocusProperty Field
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.
Identifies the HasKeyboardFocus property.
public: static initonly System::Windows::Automation::AutomationProperty ^ HasKeyboardFocusProperty;
public static readonly System.Windows.Automation.AutomationProperty HasKeyboardFocusProperty;
staticval mutable HasKeyboardFocusProperty : System.Windows.Automation.AutomationProperty
Public Shared ReadOnly HasKeyboardFocusProperty As AutomationProperty
Field Value
Examples
The following example retrieves the current value of the property. The default value is returned if the element does not provide one.
bool hasFocus = (bool)
autoElement.GetCurrentPropertyValue(AutomationElement.HasKeyboardFocusProperty);
Dim hasFocus As Boolean = CBool(autoElement.GetCurrentPropertyValue(AutomationElement.HasKeyboardFocusProperty))
Remarks
This identifier is used by UI Automation client applications. UI Automation providers should use the equivalent identifier in AutomationElementIdentifiers.
This property can also be retrieved from the Current or Cached properties.
Return values of the property are of type Boolean. The default value for the property is false
.
Applies to
See also
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per