ToggleButton.IsThreeState 屬性

定義

取得或設定值,這個值表示控件是否支援三種狀態。

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

void IsThreeState(bool value);
public bool IsThreeState { get; set; }
var boolean = toggleButton.isThreeState;
toggleButton.isThreeState = boolean;
Public Property IsThreeState As Boolean
<togglebutton IsThreeState="bool"/>

屬性值

Boolean

bool

如果 控件支援三種狀態,則為 True;否則為 false。 預設值為 false

備註

ToggleButton 和 可以有三種狀態:

State 屬性
已核取 IsChecked true
未核取 IsChecked false
不確定 IsChecked null

若要讓 ToggleButton 報告不確定的狀態,您必須將 IsThreeState 屬性設定為 true

注意

ToggleButton 對於不確定和未核取的狀態具有相同的視覺狀態。 CheckBox 等衍生控件可能會為每個狀態定義不同的視覺狀態。

適用於