Freigeben über


ContextMenu.Closed Ereignis

Definition

Tritt ein, wenn eine bestimmte Instanz eines ContextMenu geschlossen wird.

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

Ereignistyp

Beispiele

Das folgende Beispiel zeigt, wie die ContextMenu Ereignisse verwendet werden: Opened und Closed.

<ContextMenu Name="cm" Opened="OnOpened" Closed="OnClosed" StaysOpen="true">
void OnOpened(object sender, RoutedEventArgs e)
{
    cmButton.Content = "The ContextMenu Opened";
}
void OnClosed(object sender, RoutedEventArgs e)
{
    cmButton.Content = "The ContextMenu Closed";
}
Private Sub OnOpened(ByVal sender As Object, ByVal args As RoutedEventArgs)
    cmButton.Content = "The ContextMenu Opened"
End Sub

Private Sub OnClosed(ByVal sender As Object, ByVal args As RoutedEventArgs)
    cmButton.Content = "The ContextMenu Closed"
End Sub

Hinweise

Informationen zum Routingereignis

Bezeichnerfeld ClosedEvent
Routingstrategie Bubbling
Delegat RoutedEventHandler

Gilt für:

Weitere Informationen