IRawElementProviderFragment.SetFocus Method ()

 

Sets the focus to this element.

Namespace:   System.Windows.Automation.Provider
Assembly:  UIAutomationProvider (in UIAutomationProvider.dll)

void SetFocus()

The UI Automation framework will ensure that the part of the interface that hosts this fragment is already focused before calling this method. Your implementation should update only its internal focus state; for example, by repainting a list item to show that it has the focus. If you prefer that UI Automation not focus the parent window, set the ProviderOwnsSetFocus option in ProviderOptions for the fragment root.

.NET Framework
Available since 3.0
Return to top
Show: