ToggleButton::IsChecked Property
Gets or sets whether the ToggleButton is checked.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
[TypeConverterAttribute(typeof(NullableBoolConverter))] [LocalizabilityAttribute(LocalizationCategory::None, Readability = Readability::Unreadable)] public: property Nullable<bool> IsChecked { Nullable<bool> get (); void set (Nullable<bool> value); }
<object IsChecked="Boolean"/>- or -<object IsChecked="{x:Null Markup Extension}"/>
Property Value
Type: System::Nullable<Boolean>true if the ToggleButton is checked; false if the ToggleButton is unchecked; otherwise nullptr. The default is false.
A control that inherits from ToggleButton determines its behavior when this property is nullptr.
CheckBox
When the IsThreeState property is set to true, a user can click a CheckBox to pick three possible states. The following table describes the three states of a CheckBox.
State of the CheckBox | Value of IsChecked |
|---|---|
Checked | true |
Unchecked | false |
Indeterminate | nullptr |
If IsThreeState is false, you can still programmatically set this property to nullptr to put the CheckBox in an indeterminate state, but the user cannot set the CheckBox to the indeterminate state through the user interface (UI).
RadioButton
If you set this property to nullptr on a RadioButton, the RadioButton is unchecked.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.