New to Telerik UI for WPF? Download free 30-day trial

ContextMenu

You can display a context menu when the user interacts with the notify icon with the help of the TrayContextMenu property.

TrayContextMenu

The TrayContextMenu property expects a value of type RadContextMenu. Example 1 demonstrates how it can be used.

Example 1: Setting TrayContextMenu

<telerik:RadNotifyIcon 
    x:Name="icon"> 
    <telerik:RadNotifyIcon.TrayContextMenu> 
        <telerik:RadContextMenu IconColumnWidth="0"> 
            <telerik:RadMenuItem Header="Item 1" /> 
            <telerik:RadMenuItem Header="Item 2" /> 
 
            <telerik:RadMenuItem Header="Item 3" /> 
        </telerik:RadContextMenu> 
    </telerik:RadNotifyIcon.TrayContextMenu> 
</telerik:RadNotifyIcon> 

Figure 1: RadContextMenu displayed over the icon

RadContextMenu displayed over the icon

ContextMenuActivationMouseEvent

The ContextMenuActivationMouseEvent property determines when the context menu will be shown. The default value is RightClick.

Example 2: Setting ContextMenuActivationMouseEvent

<telerik:RadNotifyIcon ContextMenuActivationMouseEvent="RightDoubleClick" /> 

See Also

In this article