Control.TabIndex プロパティ
定義
ユーザーが Tab キーを使用してコントロール間を移動するときに、要素がフォーカスを受け取る順序を決定する値を取得または設定しますGets or sets a value that determines the order in which elements receive focus when the user navigates through controls by using the TAB key.
public:
property int TabIndex { int get(); void set(int value); };
[System.ComponentModel.Bindable(true)]
public int TabIndex { get; set; }
member this.TabIndex : int with get, set
Public Property TabIndex As Integer
プロパティ値
デバイスの論理ナビゲーションの順序を決定する値。A value that determines the order of logical navigation for a device. 既定値は MaxValue です。The default value is MaxValue.
- 属性
例
次の例では、3つのボタンのタブインデックスを設定します。The following example sets the tab index of three buttons.
<Button Name="btn9" BorderThickness="5.0"
Click="ChangeBorderThickness" TabIndex="2">
BorderThickness
</Button>
<Button Name="btn10" FontStretch ="Condensed"
Click="ChangeFontStretch" TabIndex="3">
FontStretch
</Button>
<Button Name="btn11" Padding = "5"
Click="ChangePadding" TabIndex="1">
Padding
</Button>
注釈
下部のタブインデックスを持つコントロールは、上位のインデックスを持つコントロールの前にフォーカスを受け取ります。A control with a lower tab index receives focus before a control with a higher index.
依存プロパティ情報Dependency Property Information
識別子フィールドIdentifier field | TabIndexProperty |
メタデータプロパティがに設定されるtrue Metadata properties set to true |
NoneNone |