Overview

This topic covers the specific events exposed by the RadContextMenu control.

The RadContextMenu is an ItemsControl. Almost all of the exposed events are inherited from the ItemsControl class. The RadContextMenu adds several additional events for the developer.

Telerik UI for WPF Ninja image

The Events is part of Telerik UI for WPF, a professional grade UI library with 160+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

To learn more about the events raised by the RadMenuItem, please take a look at the RadMenu's help.

The RadContextMenu control raises the following specific event:

  • ItemClick - occurs each time an item in the RadContextMenu gets clicked. The event handler receives two arguments:

    • The sender argument contains the RadContextMenu. This argument is of type object but can be cast to the RadContextMenu type.

    • A RadRoutedEventArgs object.

If the RadMenuItem is in the role of a header (has child items), the ItemClick event won't be raised, unless the NotifyOnHeaderClick property is set to True.

The ItemClick event is fired after the Click event of the clicked RadMenuItem.

  • Opening - occurs each time before RadContextMenu gets opened. The event handler receives two arguments:

    • The sender argument contains the RadContextMenu. This argument is of type object but can be cast to the RadContextMenu type.

    • A RadRoutedEventArgs object.

    If you handle this event (set e.Handled = true), you will prevent RadContextMenu to open.

  • Opened - occurs each time the RadContextMenu gets opened. The event handler receives two arguments:

    • The sender argument contains the RadContextMenu. This argument is of type object but can be cast to the RadContextMenu type.

    • A RoutedEventArgs object.

  • Closed - occurs each time the RadContextMenu gets closed. The event handler receives two arguments:

    • The sender argument contains the RadContextMenu. This argument is of type object but can be cast to the RadContextMenu type.

    • A RoutedEventArgs object.

See Also

In this article