Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Specifies whether calls to UI Automation control pattern methods automatically set focus to the target element.
This property is read/write.
Syntax
HRESULT get_AutoSetFocus(
BOOL *autoSetFocus
);
Parameters
autoSetFocus
Return value
None
Remarks
By default, most UI Automation methods that perform an action on an element, such as IUIAutomationInvokePattern::Invoke and IUIAutomationValuePattern::SetValue, set focus to the element before performing the action. For most applications, setting the focus results in a more consistent user experience. In situations where setting the focus would be disruptive, such as automating a drop-down menu, you can set AutoSetFocus to FALSE to prevent UI Automation methods from setting the focus.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | uiautomationclient.h (include UIAutomation.h) |
DLL | UIAutomationCore.dll |