MenuItem.Unchecked 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
MenuItem 處於未核取狀態時發生。
public:
event System::Windows::RoutedEventHandler ^ Unchecked;
public event System.Windows.RoutedEventHandler Unchecked;
member this.Unchecked : System.Windows.RoutedEventHandler
Public Custom Event Unchecked As RoutedEventHandler
事件類型
範例
下列範例示範如何處理 Unchecked 事件。
<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
備註
路由事件資訊
識別碼欄位 | UncheckedEvent |
路由策略 | 鼓 泡 |
代理人 | RoutedEventHandler |