ImageGear .NET
Creating Context Menu Items

You can also add your own menu items. Additionally, the user specific menu items can be set to use checkboxes and radio buttons.

There are two ways to create a ContextMenuItem. You can do it explicitly or implicitly.

The explicit way assumes the use of the constructor and is a more formal way, requiring all members to be specified explicitly:

Example
Copy Code
var contextMenuItem = new ImageGear.Web.UI.ContextMenuItem
    (ImageGear.Web.UI.ContextMenuItemType.Popup, 'Some group of items',
    precreatedContextMenu, null, null, null);

The implicit way is less strict and is based on the Javascript object notation (JSON):

Example
Copy Code
 var contextMenuItem = {
     type: ImageGear.Web.UI.ContextMenuItemType.Popup,
     text: 'Some group of items',
     items: precreatedContextMenu
  };

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback