MenuItem.IsChecked Property

Definition

Gets or sets a value that indicates whether the MenuItem is checked.

C#
[System.ComponentModel.Bindable(true)]
public bool IsChecked { get; set; }

Property Value

true if a MenuItem is checked; otherwise, false. The default is false.

Attributes

Examples

The following example shows how the IsChecked property can be used to place a check mark in front of a menu item.

XAML
<MenuItem Name="mi1" Style="{StaticResource CheckBoxMenu}" Header="Online" IsChecked="true" 
     Click="StatusClick"/>

Remarks

Dependency Property Information

Item Value
Identifier field IsCheckedProperty
Metadata properties set to true BindsTwoWayByDefault, Journal

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10