menu

ASP.NET MVC

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class CommandManager

    Show / Hide Table of Contents

    Class CommandManager

    Command Manager provides support to define custom commands. The custom commands are executed when the specified key gesture is recognized.

    Inheritance
    System.Object
    EJTagHelper
    CommandManager
    Inherited Members
    EJTagHelper.GetControlDetails()
    EJTagHelper.GetControlDetails(String)
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.JavaScript.DataVisualization.Models.Diagram
    Assembly: Syncfusion.EJ.dll
    Syntax
    public class CommandManager : EJTagHelper

    Constructors

    CommandManager()

    Declaration
    public CommandManager()

    Properties

    Commands

    Gets or sets object that maps a set of command names with the corresponding command objects

    Declaration
    [JsonProperty("commands")]
    public Dictionary<string, object> Commands { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>

    Object

    Examples
       <script>
           function canExecute(args) {
               var diagram = $("#DiagramContent").ejDiagram("instance");
               return diagram.model.selectedItems.children.length;
           }
           function execute(args) {
               var diagram = $("#DiagramContent").ejDiagram("instance");
               diagram.copy();
               diagram.paste();
           }
       </script>
               DiagramProperties Model = new DiagramProperties();
               Model.CommandManager = new CommandManager();
               Command Command = new Command();
               Command.Gesture = new Gesture();
               Command.Gesture.Key = Keys.C;
               Command.Gesture.KeyModifiers = KeyModifiers.Shift;
               Command.CanExecute = "canExecute";
               Command.Execute = "execute";
               Model.CommandManager.Commands.Add("clone", Command);
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved