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
override HasFocus : bool
function get HasFocus () : boolean

Property Value

Type: System.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