ToggleButton.IsChecked ToggleButton.IsChecked ToggleButton.IsChecked ToggleButton.IsChecked Property


Gets or sets whether the ToggleButton is checked.

public : IReference<Platform::Boolean> IsChecked { get; set; }
IReference<bool> IsChecked();

void IsChecked(IReference<bool> ischecked);
public Nullable<bool> IsChecked { get; set; }
Public ReadWrite Property IsChecked As Nullable<bool>
<togglebutton IsChecked="bool"/>
<togglebutton IsChecked="{x:Null}"/>

Property Value

Nullable<bool> Nullable<bool>

true if the ToggleButton is checked; false if the ToggleButton is unchecked; otherwise null. The default is false.

If you are programming using C# or Microsoft Visual Basic, the type of this property is projected as bool? (a nullable Boolean).


ToggleButton and can have three states:


For the ToggleButton to report the indeterminate state, you must set the IsThreeState property to true.


ToggleButton has the same visual state for the indeterminate and unchecked states. Derived controls, like CheckBox, may define different visual states for each state.

To set the value to null in XAML, use the {x:Null} markup extension.

See also