ContextMenu.Closed ContextMenu.Closed ContextMenu.Closed ContextMenu.Closed Event

Definition

Tritt ein, wenn eine bestimmte Instanz eines ContextMenu geschlossen wird.Occurs when a particular instance of a ContextMenu closes.

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

Beispiele

Im folgenden Beispiel wird gezeigt, wie ContextMenu die- Opened Ereignisse Closedverwendet werden: und.The following example shows how use the ContextMenu events: Opened and 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 RoutingereignisRouted Event Information

BezeichnerfeldIdentifier field ClosedEvent
Routing StrategieRouting strategy BlasenBubbling
delegateDelegate RoutedEventHandler

Gilt für:

Siehe auch