-api-id | -api-type |
---|---|
P:Microsoft.UI.Xaml.Controls.Primitives.ToggleButton.IsThreeState |
winrt property |
Gets or sets a value that indicates whether the control supports three states.
<togglebutton IsThreeState="bool"/>
- togglebutton
- togglebuttonA literal ToggleButton, or a derived type such as CheckBox or RadioButton.
ToggleButton and can have three states:
State | Property | Value |
---|---|---|
checked | IsChecked | true |
unchecked | IsChecked | false |
indeterminate | IsChecked | null |
For the ToggleButton to report the indeterminate state, you must set the IsThreeState property to true.
Note
ToggleButton has the same visual state for the indeterminate and unchecked states. Derived controls, like CheckBox, may define different visual states for each state.