ToggleButton.Unchecked Ereignis

Definition

Tritt ein, wenn ein ToggleButton deaktiviert wird.

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

Ereignistyp

Beispiele

Im folgenden Beispiel werden die Checked - und UncheckedEvent -Ereignisse abonniert, um das von FontStyleTextBlockzu textBlock1ändern.

<CheckBox Name="chkbox" Content="Italicize text"
          Checked="chkbox_Checked"
          Unchecked="chkbox_Unchecked"/>

<TextBlock Name="textBlock1" FontSize="14">
  The quick brown fox jumps over the lazy dog.
</TextBlock>
void chkbox_Unchecked(object sender, RoutedEventArgs e)
{
    textBlock1.FontStyle = FontStyles.Normal;
}

void chkbox_Checked(object sender, RoutedEventArgs e)
{
    textBlock1.FontStyle = FontStyles.Italic;
}
Private Sub chkbox_Unchecked(ByVal sender As Object, ByVal e As RoutedEventArgs)
    textBlock1.FontStyle = FontStyles.Normal
End Sub

Private Sub chkbox_Checked(ByVal sender As Object, ByVal e As RoutedEventArgs)
    textBlock1.FontStyle = FontStyles.Italic
End Sub

Hinweise

Informationen zum Routingereignis

Bezeichnerfeld UncheckedEvent
Routingstrategie Bubbling
Delegat RoutedEventHandler

Gilt für: