Back to Devexpress

ASPxHtmlEditorSettings.AllowContextMenu Property

aspnet-devexpress-dot-web-dot-aspxhtmleditor-dot-aspxhtmleditorsettings.md

latest3.5 KB
Original Source

ASPxHtmlEditorSettings.AllowContextMenu Property

Gets or sets a value that specifies whether the editor’s specific context menu is available to end-users in design view and html view.

Namespace : DevExpress.Web.ASPxHtmlEditor

Assembly : DevExpress.Web.ASPxHtmlEditor.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(DefaultBoolean.True)]
public DefaultBoolean AllowContextMenu { get; set; }
vb
<DefaultValue(DefaultBoolean.True)>
Public Property AllowContextMenu As DefaultBoolean

Property Value

TypeDefaultDescription
DefaultBooleanTrue

One of the DefaultBoolean enumeration settings.

|

Available values:

NameDescriptionReturn Value
True

The value is true.

|

0

| | False |

The value is false.

|

1

| | Default |

The value is specified by a global option or a higher-level object.

|

2

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to AllowContextMenu
ASP.NET MVC ExtensionsHtmlEditorSettings

.Settings .AllowContextMenu

| | ASP.NET Web Forms Controls | ASPxHtmlEditor |

.Settings .AllowContextMenu

|

Remarks

Options include:

SettingDescription
TrueContext menu (ASPxPopupMenu) is enabled within the ASPxHtmlEditor.
FalseContext menu is disabled within the ASPxHtmlEditor.
DefaultA browser’s context menu is used for the ASPxHtmlEditor.

The following code snippets demonstrate how to customize the AllowContextMenu property’s value.

csharp
ASPxHtmlEditor1.Settings.AllowContextMenu = false;
vb
ASPxHtmlEditor1.Settings.AllowContextMenu = False
aspx
<dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server">
    <Settings AllowContextMenu="False" />
</dx:ASPxHtmlEditor>

Note

If the AllowContextMenu property is set to DefaultBoolean.False , the context menu is not invoked via a right click within the ASPxHtmlEditor’s Design View Area. In this instance, end-users are allowed to modify the editor’s content using only visual UI elements (such as Toolbar Items).

See Also

HTML Editor

ASPxHtmlEditorSettings Class

ASPxHtmlEditorSettings Members

DevExpress.Web.ASPxHtmlEditor Namespace