[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
    Supported Formats
   [Expand]Getting Started
   [Expand]RichEditControl Document
   [Expand]Fields
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Printing
    Hyphenation
    Spell Checking
    AutoCorrect Feature
    Track Changes
    Mail Merge
    Restrictions and Protection
   [Expand]Visual Elements
    Services
    Events
    Commands
    Keyboard Shortcuts
    HTML Tag Support
   [Collapse]Examples
    [Expand]Files
    [Expand]Text
    [Expand]Formatting
    [Expand]Styles
    [Expand]Pictures
    [Expand]Tables
    [Expand]Layout
    [Expand]Automation
    [Expand]Search and Replace
    [Expand]Spell Check
    [Expand]Import and Export
    [Expand]Printing
    [Expand]Protection
    [Collapse]UI Customization
      How to: Hide or Show ScrollBars and Rulers
      How to: Customize the Search Form
      How to: Customize the Hyperlink Form
      How to: Add Custom Menu Items (Spelling Suggestions) to the Context Menu
      How to: Customize and Hide the Popup Menu
    [Expand]Commands
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Customize and Hide the Popup Menu

Expanded Customize the Pop-up Menu

This example demonstrates how to handle the RichEditControl.PopupMenuShowing event to customize the RichEditControl's context menu. You can remove and disable the existing items, and add new ones using the RichEdit Commands.

Note

The CommandPopupMenu<T>.EnableMenuItem method does not enable the context menu item if you set the corresponding command's ICommandUIState.Enabled property to false.

The RichEditMenuType enumeration lists all available context menu types. The following sample modifies the RichEditMenuType.TableCell menu, invoked by right-clicking the table cell.

Expanded Hide the Context Menu

Set the RichEditBehaviorOptions.ShowPopupMenu property to restrict showing the context menu, as shown below:

Is this topic helpful?​​​​​​​