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).
Add the Ribbon menu.
After dropping the DiagramControl on the form, select Create Ribbon Menu from the control’s smart tag.
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.
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.
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.
The corresponding method is DiagramControl.CreateDocking.