Search
Standard Item Types

Diagram elements in MindFusion.Diagramming are represented by ShapeNode, TableNode, ControlNode and DiagramLink instances. Combined and linked together, they can form complex data structures such as process or entity-relationship diagrams, class hierarchies, networks and graphs. Each of their rich features can be customized through numerous methods and properties. MindFusion.Diagramming also offers intuitive user interface for drawing and editing diagram items interactively.

Shape Nodes

Shape nodes can represent geometric shapes, flowchart elements, icons in network diagrams, and so on. They can display both graphics and text in different fonts, sizes and colors. There are more than 100 predefined node shapes (you can preview them here) and apart from them, MindFusion.Diagramming offers an easy way to define custom shapes. Shape nodes can be rotated, either interactively using the round selection handle drawn above them, or programmatically using the RotationAngle property. ShapeNode appearance can be customized further using several types of custom painting. The first type gives you full control over the painting. With the second one your painting code is performed additionally to the basic painting. The third one performs standard drawing of nodes and custom drawing of their shadows.

SVG Nodes

The SvgNode class represents nodes that can display SVG drawings in addition to the rendering provided by its base ShapeNode class. The SVG drawing is rendered after the associated Image and just before the DrawNode event is raised with CustomDraw.Additional. The SVG drawing of the node is specified through its Content property. The SVG graphics is loaded and associated with the node through a MindFusion.Svg.SvgContent object, which should be initialized and then assigned to this property.

Composite Nodes

Nodes in MindFusion.Diagramming can be composed from components. Components are graphical widgets similar to controls, which can be arranged in hierarchies and added to a Diagram through instances of the CompositeNode class. The component system contains various built-in components, such as TextComponent and ButtonComponent. For a complete list of the built-in components, check Standard Component Types. The component system can be extended with custom component classes. For more information regarding this, check Creating Custom Components. Component hierarchies can be defined and loaded from XML. To learn more about it, refer to Components and XML. The Using Components tutorial section describes various component features in step-by-step examples.

Table Nodes

Tables can be used to represent table schemas in database diagrams or classes in class-hierarchies. A table contains cells arranged in a  grid, and every cell can display text and/or image. Cells can span several rows and columns as set in the RowSpan and ColumnSpan properties. Cells, columns and rows can be customized in various ways - there are properties available for setting their extents, style, image and text alignment. Tables' dimensions can be programmatically changed; inserting, appending or deleting rows and columns can be done in a very comprehensive, intuitive way whenever you might need it. Tables can also display background images and graphics. The file formats supported are BMP, GIF, JPEG, ICO and WMF (the same applies for shape nodes).

Free-form Nodes

A FreeFormNode collects all points from users' mouse or touch input and displays them as node's outline. To let users draw free-form nodes interactively, set Behavior to DrawFreeForms. Use the Points property of FreeFormNode to get or set outline points programmatically. If the Closed property is set, the node is drawn as a closed shape and its interior filled, or otherwise the node is drawn as a poly-line. If the distance between first and last points drawn by user is shorter than AutoCloseDistance, the node gets closed automatically.

Control Hosts

A ControlNode can host any .NET Windows Forms control, i.e. an instance of System.Windows.Forms.Control -derived class. The hosted control could be of any of the standard .NET types such as DataGrid or Button; custom controls are supported as well. A ControlNode can be connected with links to any other nodes - control hosts, shapes, tables, etc.

Container Nodes

A ContainerNode can contain other diagram nodes. When a container is moved, its child nodes move too. Containers can be folded to hide the contained nodes, and unfolded back to show them again. Nodes inside a container can be linked to nodes both inside and outside of it. When a container is folded, the links connected to contained nodes point to the container outlines. Containers can be nested within each other to unlimited depth.

TreeView Nodes

The TreeViewNode class represents nodes that can display hierarchical data. The root items displayed in the node can be accessed through the RootItems property. New items can be added to and removed from the returned collection. The root items can have child items on their own and so on. For more information, refer to the TreeViewItem class.

Map Nodes

The MapNode class represents nodes that can render geographical maps. At this time map nodes can display the content of Esri shapefile and OpenStreetMap files. The content of a map file is represented by an instance of the MapContent class that should be assigned to the Content property of a MapNode. Esri shapefiles are loaded through MapContent's static FromFile method, and OSM files are loaded through the FromXml method.
For Esri files the color of a map region can be set via an integer index assigned to a map's Shape object, which identifies the color from FillColors that should be used to paint the shape. When the Esri map comes with associated DBF database file, map regions can display labels if the labelField argument is specified when calling FromFile and DrawLabels is enabled.
For OSM files the pens and brushes used for rendering the map are stored within internal collections, as defined by OpenStreetMap's tagging system. Additional pens and brushes for drawing and painting certain map features can be defined by using the AddPen and AddBrush methods.

Visio Nodes

The diagram can display shapes from stencil files in Visio 2003 XML stencil format (.vsx). To load a stencil file, use an instance of the VisioStencil class. The shapes are displayed in the diagram through VisioNode objects. To associate a stencil shape with the node, create an instance of the VisioContent class and assign it to the node's Content property. Note that standard stencils installed with Visio are copyrighted by Microsoft, and you should not use them in your application. This feature is intended to let you use public domain stencils, or commercial clipart you have purchased a license for.

Barcode nodes

The BarcodeNode class displays EAN, UPC or QR barcodes as node's content. In-place edit operations let users enter new numeric codes for 1D codes or text strings for QR codes. The barcode format is specified via the Format property, the encoded number or text is set via Content, and color of 1D bars / 2D modules via BarColor.

Links

Links are used to represent various types of connections and relations in diagrams. MindFusion.Diagramming offers three basic link types:

  • polyline links composed of straight-line segments;
  • curved links composed of Bézier-spline segments;
  • links composed of horizontal and vertical segments, alternating their orientation so that every segment is orthogonal to its neighbor.

A link can be connected to a node at each of the link's ends. It is also possible to have unconnected links - having one or both of their ends  not connected to nodes. Some customizable link's properties are: arrowheads, style, color, text, pen width and style, modification behavior and number of segments.