ContextMenu.Opened 이벤트

정의

상황에 맞는 메뉴의 특정 인스턴스가 열리면 발생합니다.Occurs when a particular instance of a context menu opens.

public:
 event System::Windows::RoutedEventHandler ^ Opened;
public event System.Windows.RoutedEventHandler Opened;
member this.Opened : System.Windows.RoutedEventHandler 
Public Custom Event Opened 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 OpenedEvent
라우팅 전략Routing strategy 버블링Bubbling
대리자Delegate RoutedEventHandler

적용 대상

추가 정보