Delen via


Control.IsTabStop Property

Definition

Gets or sets a value that indicates whether a control is included in tab navigation.

public:
 property bool IsTabStop { bool get(); void set(bool value); };
bool IsTabStop();

void IsTabStop(bool value);
public bool IsTabStop { get; set; }
var boolean = control.isTabStop;
control.isTabStop = boolean;
Public Property IsTabStop As Boolean
<control IsTabStop="bool"/>

Property Value

Boolean

bool

true if the control is included in tab navigation; otherwise, false. The default is true.

Remarks

Controlling the tab sequence with a combination of IsTabStop and TabIndex rather than using the default tab sequence is sometimes necessary in order to tune the keyboard accessibility of your UI. For more info, see Keyboard accessibility.

If IsTabStop is false, the control is excluded from tab navigation. In addition, if IsTabStop is false, the control cannot receive input focus. (If you try to set focus programmatically, by calling the Focus method, Focus returns false).

If the reason you don't want the control to be a tab stop is because it's not interactive in your UI, you might want to set IsEnabled to false to make the lack of interaction more obvious. Many controls have predefined visual states that are invoked for IsEnabled =false, such as "graying out" text in labels.

Applies to

See also