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

定義

ContextMenu の特定のインスタンスが閉じたときに発生します。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 

次の例では、ContextMenuイベント:OpenedClosedします。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

注釈

ルーティングされたイベント情報Routed Event Information

識別子フィールドです。Identifier field ClosedEvent
ルーティング方法Routing strategy バブルBubbling
DelegateDelegate RoutedEventHandler

適用対象

こちらもご覧ください