The WinForms diagram is a feature-rich control for visualizing, creating, and editing interactive diagrams. It supports creating flowchart, organizational charts, mind maps, and network diagrams either through code or a visual interface.
Nodes are graphical objects that can be arranged in a diagram page. These nodes can be added to the diagram page either programmatically or during run time by dragging them from a built-in symbol selector. The shapes for these nodes can be set to any one of the predefined shapes provided. You can also design these shapes using a symbol designer utility (included in the diagram install). Nodes can be grouped together and common operations can be performed on them.
A connection port is an object that is used to establish a connection between a node and a connector. The connection port can be placed anywhere within a node or at the edge of one. You can choose one of the predefined symbols like arrow, circle, or diamond, or you can define a custom connection port. The look and feel of these connection ports is fully customizable.
Connectors are the objects used to create links between nodes. Diagram offers built-in support for automatic line routing and line bridging. The line routing functionality uses a highly optimized routing strategy to automatically route orthogonal links around existing diagram nodes. The line bridging feature creates a bridge for links to smartly cross over other links at points of intersection. Bridge styles such as arc and square are also available for connectors.
Several customizable options are provided to change the look and feel of different portions of a diagram, enabling the creation of professional-looking diagrams that reflect style patterns commonly used in business. Diagram provides options to fully customize the look and feel of nodes, connectors, and connector ports.
Diagram comes with advanced user interface features, such as zooming, panning, and rulers, to provide end users with a rich visualization experience. Zoom at mouse position, or at the center or top-left of the diagram.
A layer organizes graphical objects into groups that share a common set of default properties, and more importantly, a z-order. You can add any number of layers to a diagram and move objects between layers.
The diagram page on which all nodes are rendered is fully customizable. The drawing area of a diagram can be rendered with horizontal and vertical gridlines. You can enable horizontal and vertical rulers to indicate the coordinates of the mouse pointer position with respect to the diagram page. On zooming and panning, these rulers are adjusted to point to the exact coordinates.
Symbols can also be imported in the form of Microsoft Visio stencil files (.vss files), which can be converted into diagram symbol palettes. These symbol palettes can be edited and customized according to the needs of the user. Diagram lets users export diagrams to a variety of data formats such as bitmaps, enhanced metafiles, and .svg image files. Alternatively, when used in conjunction with Essential PDF, diagrams can be exported as PDF documents as well. Diagrams can be directly saved as bitmaps or rendered to an external graphics device context to be written out as an enhanced Metafile image.
The Diagram class contains methods for loading and saving files in both binary and SOAP formats that are supported by the .NET serialization Framework. It also supports serialization and deserialization of diagram (.edd) files and symbol palette (.edp) files.
Diagram supports printing with a print preview option.
Diagram is designed to be a high-performance, modular, easy-to-use, and easy-to-customize engine. Many of the classes and components in the library can be subclasses, providing users the ability to extend and customize the library to meet their needs. Diagram employs a model-view-controller (MVC) design to clearly separate data, presentation, and user interaction.
Diagram provides a layout manager that automatically arranges nodes. Directed tree layout arranges nodes in a tree-like structure. Hierarchical tree layout also arranges nodes in a tree-like structure, however, unlike the directed tree layout, the nodes in a hierarchical layout may have multiple parents. Organization chart layout arranges all the nodes in a parent-child relationship with the new organizational line connector, which connects nodes to get an organizational layout appearance. Radial tree layout is a specialized type of tree layout manager that arranges nodes in a circular layout. Symmetric tree layout arranges all nodes in a symmetric fashion using the vertical input distance, which specifies the distance between the adjacent nodes. Table layout arranges nodes in a tabular structure.
Diagram can be used to create a rich, Visio-like diagram builder application. This Framework provides many utility controls to help you put such an application together very easily. It includes a document explorer window that provides an overview of the different nodes and connectors in a document, organized by layer, in a tree-like fashion. This provides a good overview of the different elements that make up your diagram.
The comprehensive set of editing tools provided by diagram allows users to work interactively with the diagram control for diagram-building applications. Besides the built-in tools, custom tools can be defined and added to the diagram control to provide custom functionalities. Tools are available both in a toolbar and in the built-in context menus.
The symbol palette is a large collection of predefined nodes. It allows nodes and line connectors to be easily dragged and dropped in a diagram page, making them easier to manage. Custom symbols can also be added to the symbol palette.
Symbol designer is a stand-alone application that lets you create and modify custom symbols. The custom shapes designed can then be used in your applications and also in the Diagram Builder application.
Diagram is integrated with the Essential Scripting Library to support diagram creation with scriptable interactivity. The Framework also provides enhanced design-time support through a rich user interface for creating and editing scripts. The scripting feature allows end users to define behaviors for diagram entities at run time using one of the supported scripting languages. The scripting languages currently supported are C#, Visual Basic .NET, and JScript .NET.