.NET Framework (current version)
Occurs when a particular instance of a context menu opens.
PresentationFramework (in PresentationFramework.dll)
public event RoutedEventHandler Opened
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";
Return to top
Available since 3.0