The requested page is not available for the requested platform. You are viewing the content for Default platform.

HtmlEditorContextMenuItemCollection Class

A collection that maintains context menu items.

Namespace: DevExpress.Web.ASPxHtmlEditor

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

Declaration

public class HtmlEditorContextMenuItemCollection :
    Collection<HtmlEditorContextMenuItem>
Public Class HtmlEditorContextMenuItemCollection
    Inherits Collection(Of HtmlEditorContextMenuItem)

Remarks

Context menu items are stored within a collection specified by instances of the HtmlEditorContextMenuItemCollection class. The collection can be accessed via the ASPxHtmlEditor.ContextMenuItems property of an ASPxHtmlControl.

The properties and methods exposed by the HtmlEditorContextMenuItemCollection class can be used to perform common collection operations such as adding new or deleting the existing items. Each item of the collection is represented by an HtmlEditorContextMenuItem object. Individual items can be accessed using either indexer notation or their command names via the specific methods of the collection.

Examples

using DevExpress.Web.ASPxHtmlEditor;

...

protected void Page_Load(object sender, EventArgs e) {
     if (!IsPostBack) {
          MyHtmlEditor.ContextMenuItems.CreateDefaultItems();
          MyHtmlEditor.ContextMenuItems.Insert(0, new HtmlEditorContextMenuItem("Add Title...", "AddTitle"));
          MyHtmlEditor.ContextMenuItems.Insert(1, new HtmlEditorContextMenuItem("Change Title...", "ChangeTitle"));
          MyHtmlEditor.ContextMenuItems.Insert(2, new HtmlEditorContextMenuItem("Remove Title", "RemoveTitle"));
     }
}

Inheritance

See Also