Skip to content

Commit 2fdfcdc

Browse files
author
KB Bot
committed
Added new kb article pdfviewer-disable-contextmenu
1 parent 5d6108b commit 2fdfcdc

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Disabling ContextMenu in RadPdfViewer for UI for WinForms
3+
description: Learn how to disable the ContextMenu in PdfViewer for UI for WinForms by removing the RadContextMenu property.
4+
type: how-to
5+
page_title: How to Remove ContextMenu in RadPdfViewer for WinForms
6+
meta_title: How to Remove ContextMenu in RadPdfViewer for WinForms
7+
slug: pdfviewer-disable-contextmenu
8+
tags: pdfviewer, ui for winforms, radcontextmenu, disable-context-menu
9+
res_type: kb
10+
ticketid: 1695155
11+
---
12+
13+
## Environment
14+
15+
|Product Version|Product|Author|
16+
|----|----|----|
17+
|2025.2.520|RadGridView for WinForms|[Dinko Krastev](https://www.telerik.com/blogs/author/dinko-krastev)|
18+
19+
## Description
20+
21+
There could be a requirement to disable the default ContextMenu in the RadPdfViewer control.
22+
23+
## Solution
24+
25+
To disable the right-click context menu in PdfViewer for UI for WinForms, set the `RadContextMenu` property to `null`. This removes the context menu entirely, preventing it from appearing when the user right-clicks inside the RadPdfViewer.
26+
27+
### Example Code
28+
29+
````C#
30+
31+
this.radPdfViewer1.RadContextMenu = null;
32+
33+
````
34+
In some cases, the default menu items need to be modified, and the [RadPdfViewer Context Menu]({%slug winforms/pdfviewer/ui/context-menu%}) article demonstrates how to do that.
35+
36+
## See Also
37+
38+
- [PdfViewer Documentation](https://docs.telerik.com/devtools/winforms/controls/pdfviewer/overview)
39+
- [RadContextMenu Documentation](https://docs.telerik.com/devtools/winforms/controls/contextmenu/overview)

0 commit comments

Comments
 (0)