Share via


UITestControl.HasFocus Property

Gets a value that indicates whether this control currently has the focus in the user interface.

Namespace:  Microsoft.VisualStudio.TestTools.UITesting
Assembly:  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

Syntax

'Declaration
Public Overridable ReadOnly Property HasFocus As Boolean
public virtual bool HasFocus { get; }
public:
virtual property bool HasFocus {
    bool get ();
}
abstract HasFocus : bool with get 
override HasFocus : bool with get
function get HasFocus () : boolean

Property Value

Type: Boolean
true if this control currently has the focus in the user interface; otherwise, false.

.NET Framework Security

See Also

Reference

UITestControl Class

Microsoft.VisualStudio.TestTools.UITesting Namespace