MenuItem.Unchecked MenuItem.Unchecked MenuItem.Unchecked MenuItem.Unchecked Event

Definición

Se produce cuando un MenuItem está desactivada.Occurs when a MenuItem is unchecked.

public:
 event System::Windows::RoutedEventHandler ^ Unchecked;
public event System.Windows.RoutedEventHandler Unchecked;
member this.Unchecked : System.Windows.RoutedEventHandler 
Public Custom Event Unchecked As RoutedEventHandler 

Ejemplos

El ejemplo siguiente se muestra cómo tratar el Unchecked eventos.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;
}
Private Sub Bold_Checked(ByVal sender As Object, ByVal e As RoutedEventArgs)
    textBox1.FontWeight = FontWeights.Bold
End Sub

Private Sub Bold_Unchecked(ByVal sender As Object, ByVal e As RoutedEventArgs)
    textBox1.FontWeight = FontWeights.Normal
End Sub

Comentarios

Información sobre eventos enrutadosRouted Event Information

Campo de identificadorIdentifier field UncheckedEvent
Estrategia de enrutamientoRouting strategy PropagaciónBubbling
delegadoDelegate RoutedEventHandler

Se aplica a