Creating Runtime Diagram Designer

By default, only basic diagram customization operations are available to end-users at runtime. These include:

  • modifying shape text;
  • moving and deleting shapes;
  • cut/copy/paste operations;
  • undo/redo functionality.

You can provide end-users with rich diagram customization features by creating the Diagram Designer.

Manually Implementing Diagram Designer On the Form

You can provide support for on-form feature-rich diagram customization with just three steps (any step can be omitted if the corresponding functionality is not required).

  1. Add the Ribbon menu.

    After dropping the DiagramControl on the form, select Create Ribbon Menu from the control's smart tag.

    Creating Designer

    The Ribbon menu will be created at the top of the form with diagram-specific commands, which will let end-users modify shape text attributes, create shape connectors, save/load diagrams to/from files, etc.

    CustomDiagramDesigner-1-CreatedRibbon.png

    The corresponding method is DiagramControl.CreateRibbon.

    NOTE

    You may consider converting your form to the RibbonForm, which supports the RibbonControl's incorporation into the form's title bar. See Ribbon Form to learn more.

  2. Add the Toolbox and Property Grid to allow end-user to add new diagram shapes and provide access to a selected diagram item's settings. To do this, select the corresponding smart tag item.

    CustomDiagramDesigner-2-CreatedPropertyGrid.png

    The corresponding method is DiagramControl.CreateDocking.