ContextMenu.Closed 이벤트

정의

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
대리자Delegate RoutedEventHandler

적용 대상

추가 정보