Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Unchecked Event
Collapse the table of content
Expand the table of content

MenuItem.Unchecked Event

Occurs when a MenuItem is unchecked.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public event RoutedEventHandler Unchecked
<object Unchecked="RoutedEventHandler" .../>

Identifier field

UncheckedEvent

Routing strategy

Bubbling

Delegate

RoutedEventHandler

The following example demonstrates handling the Unchecked event.

<MenuItem Header="_Bold" IsCheckable="True"
          Checked="Bold_Checked"
          Unchecked="Bold_Unchecked"/>
private void Bold_Checked(object sender, RoutedEventArgs e)
{
    textBox1.FontWeight = FontWeights.Bold;
}

private void Bold_Unchecked(object sender, RoutedEventArgs e)
{
    textBox1.FontWeight = FontWeights.Normal;
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft