ContextMenu.Closed Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Event Type
Examples
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
Remarks
Routed Event Information
Identifier field | ClosedEvent |
Routing strategy | Bubbling |
Delegate | RoutedEventHandler |
Applies to
See also
Colaborați cu noi pe GitHub
Sursa pentru acest conținut poate fi găsită pe GitHub, unde puteți, de asemenea, să creați și să consultați probleme și solicitări de tragere. Pentru mai multe informații, consultați ghidul nostru pentru colaboratori.