ToggleButton.IsChecked property

Applies to Windows and Windows Phone

Gets or sets whether the ToggleButton is checked.

Syntax


public Nullable<bool> IsChecked { get; set; }


<togglebutton IsChecked="bool"/>
-or-
<togglebutton IsChecked="{x:Null}"/>

XAML Values

togglebutton

A literal ToggleButton, or a derived type such as CheckBox or RadioButton.

Property value

Type: IReference<Boolean> [C++] | System.Nullable<Boolean> [.NET]

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 Visual Basic, the type of this property is projected as bool? (a nullable Boolean).

Remarks

The nullable value for IsChecked enables the value to be indeterminate, neither true nor false. This is indicated by a value of null. To set the value to null in XAML, use the x:Null markup extension.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls.Primitives
Windows::UI::Xaml::Controls::Primitives [C++]

Metadata

Windows.winmd

See also

ToggleButton
Nullable
x:Null

 

 

Show:
© 2014 Microsoft