# Context Menu

This article describes how you can add additional functionality to **RadPdfViewer** – a context menu.

> In order to use the capabilities of [RadContextMenu](https://www.telerik.com/products/wpf/documentation/controls/radcontextmenu/overview) in **RadPdfViewer** you need to add to your project a reference to the following assemblies:
>
> * Telerik.Windows.Controls.Navigation.dll
> * Telerik.Windows.Controls.dll

## Sample RadContextMenu

The below snippet is an example of a context menu implemented through the RadContextMenu control. To be shown in the area where  **RadPdfViewer** is you have to set it as a content of the viewer.

Every **RadMenuItem** in the RadContextMenu is bound to a RadPdfViewer command through a [CommandDescriptor](https://www.telerik.com/products/wpf/documentation/controls/radpdfviewer/ui/command-descriptors).

The **Visibility** of each RadMenuItem, on the other hand, is bound to the **IsEnabled** property of the CommandDescriptor. In order to convert the *Boolean* value to *Visibility*  value, the **BoolToVisibility** converter is used. The following XAML creates the context menu:

This is how the context menu looks:
![Rad Pdf Viewer Context Menu 03](https://www.telerik.com/products/wpf/documentation/assets/683afa39bfb476bc97545bd473fa2a31/radpdfviewer_context_menu_03.png)

The context menu can change dynamically. For example, when the Text Selection mode is enabled, Copy and Select All items are displayed in the menu with a separator below them:
![Rad Pdf Viewer Context Menu 02](https://www.telerik.com/products/wpf/documentation/assets/0acc59b3658f2bd8ba8683c177478521/radpdfviewer_context_menu_02.png)

Additionally, you can easily add a custom menu item to the context menu by binding it to a custom command descriptors. More on how to create command descriptors you can find [here](https://www.telerik.com/products/wpf/documentation/controls/radpdfviewer/ui/command-descriptors).

> tip Find a runnable project of the previous example in the [WPF Samples GitHub repository](https://github.com/telerik/xaml-sdk/tree/master/PdfViewer/ContextMenu).

## See Also

[Command Descriptors](https://www.telerik.com/products/wpf/documentation/controls/radpdfviewer/ui/command-descriptors).
