ToggleButton.Unchecked Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when a ToggleButton 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
Event Type
Examples
The following example changes subscribes to the Checked and UncheckedEvent events to change the FontStyle of the TextBlock, textBlock1
.
<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
Remarks
Routed Event Information
Identifier field | UncheckedEvent |
Routing strategy | Bubbling |
Delegate | RoutedEventHandler |
Applies to
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.