Example of Drawing Tools in ASP.NET MVC Diagram Control
This sample visualizes how to build a diagram interactively using drawing tools. Continuous draw option, snapping, and undo/redo support are enabled to easily draw diagrams. Rulers, gridlines, and snapping options are enabled to easily align objects.
This example shows how to draw shapes and connections interactively. In addition to that, rulers, gridlines, and snapping options are enabled to assist drawing.
The tool
property can be used to enable drawing. Add DrawOnce
or ContinousDraw
option to the
tool
property of the diagram. The drawingObject
property can be used to define a shape/connector to be drawn.
Few shape and connector templates are added in the palette. To draw basic shapes and connectors, click the templates in the palette. For polygon shapes, a corner/point will be added to the polygon for each mouse left button click. Drawing will be completed either on mouse right button click or double click.