Search
Version History

The list below describes past changes and additions to MindFusion.Diagramming:

New in version 6.8.6

  • Specify what visual effect to show during interactive modification of items by setting ModificationEffect.
  • The Opacity property lets you create translucent DiagramItem by applying it to the alpha channel of all colors in the item.
  • New CopySelection overload lets you copy a list of items without selecting them.
  • Set GridPatternHatch and GridPatternThreshold to replace alignment grid with hatch pattern at low zoom levels for faster drawing.
  • The ValidateLinkCrossing event validates visibility of individual link crossing point decorations.
  • Arrange method of ContainerNode now adds offset for CaptionHeight; adjusting for caption through layout's Margins is no longer necessary.
  • SvgContent parser fixes for subpaths and missing delimiters.
  • FromFile and FromStream static methods added to SvgContent let you load SVG drawings with less code.
  • Fix for ResizeToFitText method ignoring TextPadding in KeepWidth mode.

New in version 6.8.5

Styled supplementary labels

The EnableStyledText property of ItemLabel lets you enable or disable styled text rendering in node and link labels. Styled text can contain italic, bold, underline, subscript, superscript and color attributes applied to its substrings. The attributes are specified using HTML-like formatting tags embedded in the raw text, listed in Text Attributes and Formatting section of the help file.

SvgNode improvements

  • SvgNode can load SVG styles by id and type CSS selectors.
  • Bitmap images embedded in SVG can now be decoded from non-PNG formats.
  • Improved rendering of text embedded in SVG.
  • Fix for S command in path data (shortcut syntax for cubic Bezier curves) when not following another curve.
  • Support for transforms on embedded bitmaps.
  • Support for new-line symbols in style and path data attributes.

Fixed bugs

  • Fix for link positions not reindexing correctly when spatial index is enabled.

New in version 6.8.4

  • New PatternRouter constructor accepts string definitions of link routes.
  • EnableParallelism and MaxDegreeOfParallelism layout properties now available in CoreCLR assemblies (.NET Core 3 and 5+ versions).
  • SvgNode now displays bitmaps embedded in SVG content.
  • SvgNode now supports dashed lines in SVG content (defined via stroke-dasharray attribute).
  • New Export overloads of exporter classes allow writing to System.IO.Stream.
  • New grouping type via AttachToFractionalPosition method of Group and respective AttachTo overload.
  • JSON serialization / deserialization preserves primitive types of Id and Tag values.

New in version 6.8.3

Multiple labels per node

The NodeLabel class allows multiple captions to be displayed for a single DiagramNode of any type. Node labels provide a set of properties allowing full customization of their display and positioning. Label position is defined by specifying a pin point and offset from it, set through SetCornerPosition, SetEdgePosition, SetCenterPosition methods. In addition, the HorizontalAlign and VerticalAlign properties of NodeLabel specify on which side of pin point to draw the label's caption.

For example, following code adds extra labels to top-left and bottom-right corners of a ShapeNode:

C#  Copy Code

var node = diagram.Factory.CreateShapeNode(10, 50, 40, 30);
node.Text = "text"; // centered main text

var lb1 = node.AddLabel("label 1");
lb1.SetCornerPosition(0, 0, 0);
lb1.HorizontalAlign = StringAlignment.Near;
lb1.VerticalAlign = StringAlignment.Near;
lb1.Brush = new SolidBrush(Color.Red);
lb1.TextBrush = new SolidBrush(Color.White);

var lb2 = node.AddLabel("label 2");
lb2.SetCornerPosition(2, 0, 0);
lb2.HorizontalAlign = StringAlignment.Far;
lb2.VerticalAlign = StringAlignment.Far;
lb2.Brush = new SolidBrush(Color.Yellow);
lb2.TextBrush = new SolidBrush(Color.Red);

Miscellaneous

New in version 6.8.2

.NET 6 assemblies

The distribution now includes assemblies for .NET 6. Locally installed assemblies don't show automatically in toolbox at this time, you can either add them manually or through Nuget package manager.

Miscellaneous

  • The MouseWheelAction property of DiagramView lets you toggle between scrolling or zooming via mouse-wheel, or disable built-in support in order to apply custom logic from MouseWheel event handler.
  • ArrangeAsync method is now available in CoreCLR assemblies (.NET Core 3 and 5+ versions).
  • The SetZoomFactor method of DiagramView lets you change the zoom level while preserving the on-screen position of specified diagram point.
  • TableNode.Image is now serialized in JSON format.
  • The EnumAllPaths method of PathFinder yields each path immediately when found.

New in version 6.8.1

Link routing

Miscellaneous

API changes

For consistency with CellClicked and NodeClicked events, the control now also raises NodeDoubleClicked for a TableNode after CellDoubleClicked. To revert back to old behavior, set the PreventNodeEvent argument.

New in version 6.8

Spatial index

Set the EnableSpatialIndex property of Diagram to create an index of item positions for faster hit-testing and viewport clipping queries. This should greatly improve user interaction and rendering speed for diagrams containing tens of thousands or more items.

C#  Copy Code

// it will take some time to populate the diagram with a million nodes,
// but subsequent redraws and hit-tests should be very fast
diagram.ValidityChecks = false;
diagram.SelectAfterCreate = false;

for (int c = 0; c < 1000; c++)
{
    for (int r = 0; r < 1000; r++)
    {
        var node = diagram.Factory.CreateShapeNode(
            20 + c * 40, 20 + r * 40, 25, 25);
        node.Text = diagram.Nodes.Count.ToString();
    }
}
diagram.ResizeToFitItems(20);
diagram.EnableSpatialIndex = true;
diagramView.Diagram = diagram;

Note that rendering speed improves only when showing a smaller part of the diagram inside DiagramView's viewport. Rendering a lot of items at small zoom levels or in Overview's fit-all mode will still need a lot of processing, so you might want to apply constraints on minimal zoom level of diagram view and overview controls for large diagrams.

Pattern router

New PatternRouter class routes links by applying patterns of segment and turn sequences and accepting them when resulting paths do not cross nodes. A path is accepted if its final segment ends in target point and is orthogonal to respective side of target node. If there are several possible paths, the router selects the shortest one. The MinimumDistance property specifies minimum allowed distance of link segments from nodes. The PreferredDistance property specifies distance of first or last link bend from associated node. PatternRouter includes several predefined patterns designed to create consistent-looking paths, and allows creation of custom patterns. Custom patterns can be defined as sequence of RouteStep objects specifying whether the path advances by relative or absolute distance, or changes direction:

C#  Copy Code

var rightZigzag = new RoutePattern();
rightZigzag.Steps.Add(
    new RouteStep(RouteStepKind.AdvanceRelative, 0.5f));
rightZigzag.Steps.Add(
    new RouteStep(RouteStepKind.TurnRight));
rightZigzag.Steps.Add(
    new RouteStep(RouteStepKind.AdvanceRelative, 1));
rightZigzag.Steps.Add(
    new RouteStep(RouteStepKind.TurnLeft));
rightZigzag.Steps.Add(
    new RouteStep(RouteStepKind.AdvanceRelative, 0.5f));
router.Patterns.Add(rightZigzag);

Composite router

The CompositeRouter class lets you chain link routers (objects implementing ILinkRouter interface) so that a link passes through the sequence until it gets routed successfully. Diagram's default LinkRouter is now set to a CompositeRouter instance containing a PatternRouter and GridRouter sequence. This applies the several standard pattern paths when possible, and otherwise routes links using the cost minimizing heuristics-based grid router.

Miscellaneous

Fix for cosmetic / zero-width pens no longer working after KB5006670 Windows Update. Before KB5006670 GDI+ used to apply them as 1-pixel wide lines regardless of graphics unit and zoom level, which the diagram control now implements internally.

API changes

New in version 6.7

Scrollable containers

Set the Scrollable property of ContainerNode to let users scroll the container's contents. The node then displays scrollbars at right and bottom edges that can be used to scroll interactively. The ScrollX and ScrollY properties let you determine current scroll position or change it programmatically. Note that in order to let container's content overflow and become scrollable, you must either disable AutoGrow, or allow users reduce container size by changing HandlesStyle and EnabledHandles properties from their default MoveOnly / Move values.

Container improvements

  • ContainerNode containment is no longer implemented via a Group object. Child nodes are now stored in the dedicated Children collection, and a node's container is returned by the Container property.
  • Enable the AutoDeleteChildren property to automatically delete child nodes when a container is deleted.
  • Drag-and-drop operations from NodeListView, ShapeListBox and ShapeToolBar automatically add the newly created node to a container if one is found at the drop position.
  • Call the ResizeToFitChildren method to resize a container, making it big enough to contain its child nodes.
  • The KeepInsideParent constraint of child nodes now also prevents them from overlapping the container's caption bar.

Lasso zoom tool

The control now supports several ways to zoom using lasso tool:

Miscellaneous

  • The InitializeLasso event lets you customize appearance of selection lasso before it shows on screen.
  • New BringIntoView overload lets you scroll to specified rectangular area.
  • New ZoomToRect overload lets you zoom to a rectangular area while keeping it centered in the viewport.

API changes

New in version 6.6.2

.NET 5 support

The MindFusion.Diagramming distribution now includes assemblies for .NET 5. Design time support is not available at this time, you can add DiagramView and other controls to a form only by code.

Miscellaneous

API changes

Type of ContextMenu property of Ruler control changed from ContextMenu to ContextMenuStrip.

New in version 6.6.1

CompositeNode Json templates

CompositeNode templates can now be defined in JSON format compatible with MindFusion JavaScript diagramming library:

C#  Copy Code

string template = @"{
 ""component"": ""SimplePanel"",
 ""children"":
 [
  {
   ""component"": ""Shape"",
   ""name"": ""Frame"",
   ""pen"": ""black"",
   ""strokeThickness"": 0.2,
   ""isOutline"": true,
   ""autoProperty"": true
  },
  ....

Call the LoadJsonTemplate method to create components from JSON definition. The GenerateJsonTemplate method returns a JSON template generated from current component hierarchy.

Miscellaneous

  • The MoveNodes behavior allows grabbing nodes to drag them without using adjustment handles.
  • Font fallback is now enabled by default. To disable font fallback, set the NoFontFallback flag in TextFormat property of diagram and items.
  • JSON serialization fixes.
  • SvgContent.LoadImage no longer tries to download SVG dtd schema definitions.
  • Fixed exception in GridRouter.

New in version 6.6

Animations

Diagram items can now be animated through the Animation class from MindFusion.Animations namespace, letting you for example attract user attention to a node by running a bouncing animation:

C#  Copy Code

// start bouncing animation
var animationOptions = new AnimationOptions();
animationOptions.FromValue = node.Bounds.Y;
animationOptions.ToValue = node.Bounds.Y + 50;
animationOptions.Duration = 1000 * 5;
animationOptions.AnimationType = AnimationType.Bounce;
animationOptions.EasingType = EasingType.EaseOut;

var animation = new Animation(node, animationOptions);
animation.Start();

By default, animations change the vertical position of nodes. Other node properties can be animated by providing an UpdateCallback function to the Animation constructor, which will be called each time an animation progresses. The Animation class implements several built-in animation and easing types, which allow implementing various effects such as bounce, slide in or out, fade in or out. Custom animation functions can be defined too.

Animated layout

ArrangeAnimated methods added to Diagram and ContainerNode classes animate the movement of items from their original locations to new locations assigned by the layout object. This can be used to create an explode effect by starting new layout from overlapping nodes on same position, or an insertion effect by adding a new node to an existing layout.

JSON Serialization

Diagrams can now be serialized in JSON format. This can be used for interoperability with MindFusion JavaScript diagramming library, or for general storage in JSON files or databases. To serialize a Diagram to a JSON string, call its SaveToJson method. To deserialize a diagram back from its JSON representation, call the LoadFromJson method. Custom item classes can implement JSON serialization for their additional properties by overriding the SaveToJson and LoadFromJson methods of DiagramItem. Such classes must be registered for serialization by calling the RegisterItemClass method and providing a string identifier for the clientClass parameter.

.NET Core assemblies

(beta version)

The MindFusion.Diagramming distribution now includes assemblies for .NET Core 3. Design time support is not available at this time, you can add DiagramView and other controls to a form only by code.

Miscellaneous

  • Arrange method of ContainerNode arranges the child items inside a container using the specified layout class.
  • For consistency with MindFusion APIs for other platforms, the Diagram class now provides Arrange and ArrangeAsync (CLR 4.5+) methods that take a layout object as argument.
  • New CreateDiagramLink overload of the Factory class makes it easier to create links between TreeViewNode items.
  • ZoomControl's zoom level label is now rendered using the inherited Control.Font property instead of a hard-coded font.

New in version 6.5.4

New in version 6.5.3

Visio2013Exporter improvements

  • Visio2013Exporter now does full rendering for table, container and composite nodes.
  • Visio2013Exporter renders custom nodes that draw themselves through the IGraphics interface.
  • Coordinates of exported link end points are now assigned Visio formulas and follow the borders of resized nodes.

Miscellaneous

  • The Text property of nodes and links has been moved to the base DiagramItem class, allowing for easier text search and edit operations in the diagram. The Caption property of container and table nodes now only wraps the base Text property. Map and Visio nodes now render Text too.

New in version 6.5.2

LayeredLayout improvements

  • The KeepLinkShapes property of LayeredLayout lets you preserve initial Shape value of links when LinkType is set to Cascading. The orthogonal path applied by latter property is approximated using respective link shape.
  • Fix for wrong link positions when the diagram contains folded containers.
  • Fix for unnecessarily large distance between subsequent layers after a long node appears in a layer.

PathFinder improvements

  • Speed of FindAllCycles and EnumAllCycles methods improved.
  • FindAllCycles and EnumAllCycles no longer report mirrored versions of cycles in undirected mode.

Miscellaneous

  • Improved precision when hit testing adjustment handles from touch event handlers.
  • Fix for incorrectly exported Procedure shape by ExcelExporter.

New in version 6.5.1

Export Excel files

The ExcelExporter class from MindFusion.Diagramming.Export.Excel.dll assembly exports diagrams to Excel Open XML Format (XLSX) files. Diagrams are exported as Excel AutoShapes drawings. The Export overload that takes a DiagramDocument parameter creates a sheet for each DiagramPage in the document. The Export(Diagram) overload creates a single Excel sheet.

Visio2013Exporter improvements

New in version 6.5

Non-blocking layout methods

All graph layout classes now contain an async ArrangeAsync method that runs layout calculations in a background task. This is only available in .NET 4.5 build of the diagram assemblies.

C#  Copy Code

async void OnLayoutLayered(object sender, EventArgs e)
{
    var layout = new LayeredLayout();
    await layout.ArrangeAsync(diagram);
    diagramView.ZoomToFit();
}

Miscellaneous

New in version 6.4.3

Flip shapes

The shape of a ShapeNode can be flipped horizontally or vertically. Enable the AllowFlip property and the shape flips when an edge is dragged over its opposite edge. You can get or set current flip state using FlipX and FlipY properties.

DiagramLink improvements

  • AllowSplitLinks now works for Bezier links too. Users can insert a new Bezier segment by dragging any point (other than a control point) of a selected link. Adjacent segments can be merged back into a single one by dragging a tangent control point (square adjustment handle) onto a pass-through control point (round adjustment handle).
  • IntermediateShape shapes are now rendered at correct position for Spline links.
  • Points where overlapping Cascading links diverge can be marked with shapes specified via LinkBranchIndicator, BranchIndicatorSize and BranchIndicatorColor properties, making it easier to differentiate between branching and crossing segments. The Arrow indicator also shows direction of the link.

Improved touch support

  • The control disables Windows touch gestures that interfere with its user interaction code.
  • The TouchThreshold property lets you set larger area around adjustment handles where hit is detected, making it easier to modify items on touchscreen without showing visibly large handles.
  • The PanAndModify behavior lets you select and modify when the mouse pointer is over an item, or pan the view otherwise.

Miscellaneous

New in version 6.4.2

Fluent API

Extension methods in MindFusion.Diagramming.Fluent and MindFusion.Diagramming.Layout.Fluent namespaces add support for fluent programming style:

C#  Copy Code

using MindFusion.Diagramming.Fluent;
using MindFusion.Diagramming.Layout.Fluent;
//...

diagram.Factory
    .CreateShapeNode(10, 10, 20, 20)
        .Brush(Color.LightGray)
        .Font("Arial", 12)
        .EnableStyledText(true)
        .Text("Task <i>1</i>")
        .ToolTip("This is the task");

new TreeLayout()
  .LevelDistance(20)
  .NodeDistance(20)
  .LinkStyle(TreeLayoutLinkType.Cascading3)
  .Arrange(diagram);

DiagramLink improvements

  • The component no longer keeps a separate segmentCount field, removing a common source of errors. The SegmentCount property now calculates its value from ControlPoints elements. The UpdateFromPoints(updateGroups, updateSegments) overload has been removed too.
  • SegmentCount setter no longer refuses changing number of segments if auto-routing is enabled or the link is a self-loop.
  • The new Spline element of LinkShape enumeration draws links as interpolating splines that pass through all of their control points:

Miscellaneous

  • The ExtendSelection element of ModifierKeyAction lets users select items with lasso rectangle without deselecting old ones.
  • The Visio Stencils import API provides access to BeginArrow and EndArrow values.
  • The Visio Stencils import API provides access to Connection elements defined for a shape.
  • It is now enough to set EnableStyledText to enable styled-text mode without having to also set PolygonalTextLayout.
  • Fixed bug where ItemAdded event wasn't raised for interactively drawn items.
  • Assemblies containing miscellaneous UI controls (NodeListView, LayerListView, Ruler, etc) have been merged into a single MindFusion.Diagramming.WinForms.Controls.dll.

New in version 6.4.1

New in version 6.4

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 or LinkFreeForms. 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's Closed property is automatically set to true. AutoCloseDistance default value is float.MaxValue, so free-form nodes are always closed.

Additional drawing modes, convenient for touch input, convert FreeFormNode objects drawn by user to ShapeNode objects with most similar shape. To enable them, set Behavior to DrawFreeShapes or LinkFreeShapes. The shapes against which the user's input is matched are set via diagram's FreeFormTargets property. By default it contains Rectangle, Decision and Ellipse shapes.

LinkLabel edit events

LinkTextEditing and LinkTextEdited events are now raised also when the user edits a LinkLabel. The Label property of the respective event-arguments class identifies the LinkLabel that is being edited. Label is a null reference if the user is editing link's Text value. You can prevent users from editing Text and let them edit only labels by handling LinkTextEditing like this:

C#  Copy Code
void OnLinkTextEditing(object sender, LinkValidationEventArgs e)
{
    e.Cancel = e.Label == null;
}

Fixed bugs

  • The distance required to move mouse pointer in order to resize TableNode columns and rows was dependent on MeasureUnit, making it difficult to start resizing when using large units.
  • Text outside of node boundaries was not repainted correctly after loading custom shape library from XML.
  • Missing collapse / expand icon of expandable ControlNodes.
  • TreeViewNode scrollbar arrow buttons did not scroll correctly in some situations.

New in version 6.3.4

Street maps

MapNodes can render street maps in OpenStreetMap format. Call FromXml method of MapContent to load an .osm file. The pens and brushes used for drawing the map are stored within the StreetMapPens and StreetMapBrushes collections in the static StreetMapFeatures class. You can define additional pens and brushes for drawing and painting certain map features by using MapContent's AddPen and AddBrush methods.

Miscellaneous

  • Support for .NET 2 has been dropped; the minimum supported .NET framework version now is 3.5.
  • Distribution now includes a set of digitally-signed assemblies.
  • Undo/redo records for in-place edit operations are now created automatically. They are represented by instances of the EditTextCmd class.
  • CompositeNode supports vertical scrolling in EditComponent (only via keyboard).
  • Support for FromPage and ToPage properties of PrinterSettings.
  • CreateBarcodeNode methods added to the Factory class.
  • The BarcodeNodeStyle property of Diagram defines the default appearance of BarcodeNodes.
  • Improved speed when dragging large hierarchies of grouped nodes.
  • Fix for not restoring ColumnStyle value when cancelling or undoing TableNode column resize operations.

New in version 6.3.3

Resize table columns and rows

Columns and rows of a TableNode can now be resized interactively if its AllowResizeColumns or AllowResizeRows properties are enabled. In order to resize, move the mouse pointer to the border line on column's right side or row's bottom side until it shows resize cursor and start dragging. The control raises TableColumnResizing and TableRowResizing events to let you validate new size or prevent resizing some elements. The TableColumnResized and TableRowResized events are raised after the operation completes.

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.

Miscellaneous

  • The component now selects better end points for auto-routed links when using WhileCreating and WhileModifying routing modes.
  • Custom connection point classes can now override NearestAnchorPoint to implement custom anchor point selection logic. The method is now also called at the beginning of interactive link creation.
  • The KeepInsideDiagram constraint prevents a node from leaving diagram boundaries during user interaction (the older RestrictItemsToBounds property does not stop nodes from leaving diagram area but returns them to original position if dropped outside).
  • SvgNode supports SVG images with vector-effect='non-scaling-stroke' stroke attributes.
  • Improved default DashPen value for dash-frame selection handles style. Dashed frames should now be visible on both the default white background and custom darker backgrounds.
  • ZoomControl can now be used with other components by MindFusion and has been moved to MindFusion.Common.WinForms assembly and namespace.

Fixed bugs

  • Fixed landscape/portrait button tooltip when extended print preview initially opens in landscape mode.
  • Fix for hosted controls not hiding when folding a ContainerNode containing ControlNodes.
  • Links to contained nodes were left visibly disconnected from them after deleting a folded ContainerNode.
  • Fixed clipboard support for MapNodes.
  • Fix for incorrect Visio formula parsing in VisioNodes for some regional settings.

New in version 6.3.2

Support for Visio stencils

The diagram can now 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.

License keys

There is no separate trial build of the control assemblies anymore. Instead, set the LicenseKey property to disable the component's evaluation mode and stop displaying trial messages. If your application contains more than one DiagramView instance or other controls by MindFusion, you could call MindFusion.Licensing.LicenseManager.AddLicense(key) from application start-up code to specify the key once instead of setting it per each control. License key strings are now listed on the Keys & Downloads page at MindFusion's customer portal.

Miscellaneous

New in version 6.3.1

Improved arrowhead rendering

  • Arrowheads are rendered as a single path when possible and several arrowhead Shape definitions have been changed to implement mitered joints when HeadPen is set to a thick pen.
  • The point where end segments connect to arrowheads can be specified via the LinkSegmentInset property of shapes. Shape definitions from the ArrowHeads class set it to suitable default value. This allows using transparent or semi-transparent brushes without seeing the link line drawn behind arrowheads.
  • Arrowhead shadows are no longer filled if the link's EffectiveBrush is null or fully transparent.

Miscellaneous

  • VisioExporter export speed has been improved greatly for large diagrams.
  • For consistence with MindFusion libraries for other platforms, BackBrush in default diagram style has been changed to white brush.
  • Improved DiagramLink rendering speed.
  • Multiple-resize of rotated nodes fixed to apply same offsets in nodes' local coordinate system.
  • Fixed KeepInsideParent constraint for rotated parent nodes.

New in version 6.3

Map nodes

The MapNode class represents nodes that can render geographical maps. At this time map nodes can display the content of Esri shapefile 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. When the map comes with associated DBF database file, map regions can display labels if the labelField argument of FromFile is specified and DrawLabels is enabled. The color of a map region can be set via an integer index assigned to a map's Shape object, which identifies the element of FillColors that should be used to paint the shape.

Import diagrams from SVG

The SvgImporter class allows importing Scalable Vector Graphics files (*.svg) into MindFusion.Diagramming. Each top-level SVG group element is imported as a separate SvgNode, whose Content is set to the group's child elements. If the SVG file was exported from Visio or OpenOffice Draw, SvgImporter will create DiagramLink objects for groups it recognizes as connectors in order to recreate the original diagram model, though in this case it will not preserve fully the original appearance of connectors in SVG.

Visio2013Exporter improvements

  • Support for multi-segment links.
  • Bezier links are now exported as NURBS lines.
  • Support for rotated nodes.
  • Proper scale for all MeasureUnit values.
  • Support for gradient brushes.
  • Support for semi-transparent colors.

Miscellaneous

  • Set the AutoGrow property to false to prevent containers from resizing automatically when they would not fit newly added nodes.
  • The Brush property of LinkLabel class lets you set background color for link labels.
  • Now the NodeModified event is raised after the undo record for that modification has been added to the command history. This makes it easier to merge the ModifyItemCmd with custom commands created from NodeModified handler.
  • The ChangeUnit method sets a new MeasureUnit and rescales the coordinates of diagram items to keep them the same size.
  • OrthogonalLayout no longer ignores repeating links, and will now place them at a distance specified via RepeatingLinksPadding property.
  • Fixed a bug where the magnifier tool would not scale correctly the diagram's BackgroundImage.

New in version 6.2

Tree map layout

Tree maps represent hierarchies by nesting child nodes within their parents, where the areas of leaf nodes are proportional to their Weight values. Unlike other layout algorithms, TreeMapLayout expects hierarchies to be defined via grouping or containment (see AttachTo method and ContainerNode class), and will ignore any links in the diagram. The diagram area covered by the topmost nodes in a hierarchy is specified via the LayoutArea property. By default, the layout tries to keep the ratio of node sides as close as possible to one. However this could make it hard to distinguish separate levels of the hierarchy. To alleviate that, set Squarify to false, and child nodes will be arranged either as a row or a column inside their parent node, alternating directions for each level. The drawback is that when Weight ratios differ greatly or nodes contain many children, some nodes could end up with very narrow rectangles.

Decision flowchart layout

DecisionLayout arranges simple flowcharts consisting of decision boxes with up to three outgoing links per node and activity boxes with a single outgoing link per node. The nodes are arranged in columns and rows, whose distance depends on the HorizontalPadding and VerticalPadding property values. When links share the same row or column, they are placed at a distance specified via LinkPadding. The layout arranges nodes recursively starting from StartNode. If StartNode is not specified, the algorithm selects the root of the deepest branch of the graph's spanning tree as start node.

Miscellaneous

Layout algorithms now automatically resize diagram's Bounds if it's not large enough to fit the arranged content. To revert to old behavior and keep fixed Bounds size, set GrowToFit to false.

New in version 6.1.3

Export Visio 2013 files

The Visio2013Exporter class can export the contents of Diagram and DiagramDocument objects to Visio 2013 VSDX files. In order to use it, add a reference to the MindFusion.Diagramming.Export.Visio.dll assembly. Similarly to the VDX format exporter, Visio2013Exporter relies on a template file, called Visio2013.vxt, containing some boilerplate Visio XML code. The template must be either located in same folder as the application assemblies, or its path must be specified via the TemplatePath property. At this time the exporter supports shapes from Visio basic and flowchart stencils.

Visio2013Importer improvements

  • The importer now supports Visio group shapes. Child shapes in groups are no longer lost when importing, and their corresponding diagram nodes are attached to the corresponding group node.
  • Visio NURBS curves are now imported as Bezier-style links.
  • Fix for importing connectors with applied rotation transform.
  • Shapes with a ‘hidden’ attribute in master definition are now imported as invisible items.

Headers and footers in PDF

PdfExporter can now add headers and footers to exported pages. To specify their contents and font, set the HeaderFormat, HeaderFont, FooterFormat and FooterFont properties. Adding a %P placeholder to HeaderFormat or FooterFormat will render the current page number at its position.

Miscellaneous

  • SVG renderer now honors the SmoothingMode property value and anti-aliasing in SVG drawings can be disabled.

New in version 6.1.2

Resize multiple nodes

Now it is possible to resize multiple selected nodes simultaneously. To enable that, set the AllowMultipleResize property to true. When enabled, dragging a corner or side adjustment handle of any node resizes all nodes in the selection. The operation will be cancelled for all nodes if any of them does not accept its new size, e.g. if it's smaller than MinimumNodeSize value.

Visio2013Importer improvements

  • The Item argument of ImportItem event handlers is now pre-set to a DiagramItem instance created for the imported Visio shape, letting you avoid parsing some standard data such as Bounds or Text. You can either modify this item's properties, or replace it with a new instance of a different type.
  • Fixed a crash when a shape master does not have a name attribute (this happens with custom stencils).
  • Fixed a crash when theme1.xml is missing from the imported vsdx archive (this happens with files converted from old Visio versions to 2013 format).
  • Fixed a parse exception for some non-English locales.
  • Fixed a bug where one-segment connectors were imported at wrong positions.

Miscellaneous

API changes

New in version 6.1.1

Import Visio 2013 files

The Visio2013Importer class can import .vsdx files created by Visio 2013. In order to use it, you must add a reference to the MindFusion.Diagramming.Import.Visio.dll assembly. Various overloads of the Import method can be used to import the file into a DiagramDocument whose pages correspond to the Visio drawing pages, or into a single Diagram whose content is merged from all imported pages. At this time Visio2013Importer supports the basic flowchart and data flow Visio stencils. For each node shape from the .vsdx file, the importer creates a ShapeNode object whose Shape, Text, Brush and Pen properties are set to values corresponding to the imported Visio shape. For each connector shape, the importer creates a DiagramLink object whose Origin and Destination are set to the corresponding imported nodes, and whose ControlPoints reflect the geometry of the connector.

Zoom control

The ZoomControl class lets user change interactively the current zoom level and scroll position of a DiagramView. To set it up, add a ZoomControl to the form, place it anywhere over a DiagramView, and set the control's Target property to that view. Set the ZoomStep and ScrollStep properties to specify the amount added to view's zoom level or scroll position by ZoomControl's buttons. You can customize the control's appearance by setting properties such as Fill, BorderColor, CornerRadius and TickPosition.

Miscellaneous

  • The arrow buttons in a TabbedDiagramView control now also change the active page.
  • When AllowRenamePages is enabled, DiagramPage titles can be renamed interactively by clicking the active tab in a TabbedDiagramView.
  • Several new shapes added for better compatibility with Visio 2013 basic stencil: RightTriangle, Decagon, Trapezoid, Star4Pointed, Star5Pointed, Star6Pointed, Star7Pointed, Star16Pointed, Star24Pointed, Star32Pointed, Donut, Plaque.
  • The projection of a node on the scales of Ruler control now shows the boundaries of the rotated node shape. To ignore rotation as in older versions, set ProjectRotatedBounds to false.

New in version 6.1

Support for Mono

FlowChart.NET can now be used under the Mono runtime for OSX or Linux. A single version of the mindfusion.* assemblies can be referenced by both Mono and Microsoft .NET applications. The control detects what runtime has loaded it, and provides alternative implementations for features that are currently missing from Mono.

Custom measure units

The type of the MeasureUnit property has been changed from GraphicsUnit enum to MeasureUnit class. This class lets you define custom units by specifying their dots-per inch resolution, a string name, and number of standard divisions for display in the Ruler control. The MeasureUnit class is based on a previous implementation for use in Ruler from the MindFusion.Diagramming.WinForms namespace, and the ruler's Unit property has been updated to use the new class too.

There are two new predefined units available out of the box: Centimeter and WpfPoint. The latter also lets you load XML files created by WPF and Silverlight versions of the control into a Windows Forms application.

Shape control points

Shape formulas can now be parameterized by associating control points with Shape objects. Each control point is passed to the shape script as a named variable. Apart from the name, you can specify the default, min and max coordinates for each parameter via the ShapeControlPoint constructor, and whether to treat its values as percents or fixed offset.

API changes

New in version 6.0.4

Import OpenOffice Draw files

The DrawImporter class can import .odg files, created by the OpenOffice Draw vector graphics editor. In order to use it, you must add a reference to the MindFusion.Diagramming.Import.Draw.dll assembly. Various overloads of the Import method can be used to import the OpenOffice drawing into a DiagramDocument whose pages correspond to the Draw pages, or into a single Diagram whose content is merged from all imported pages. DrawImporter supports shapes from the General and Flowchart shape palettes in Draw. For each node shape from the .odg file, the importer creates a ShapeNode object whose Shape, Text, Brush and Pen properties are set to values corresponding to the imported OpenOffice shape. For each connector shape, the importer creates a DiagramLink object whose Origin and Destination are set to the corresponding imported nodes, and whose ControlPoints reflect the geometry of the connector.

Miscellaneous

New in version 6.0.3

ContainerNode improvements

  • child nodes are now drawn by their containers; when containers overlap, the children of a lower container cannot appear in front of the upper container anymore;
  • the ClipChildren property specifies whether to clip child items to container’s boundaries;
  • the ZIndex property  no longer changes automatically when dropping nodes into a container;
  • the Visible property of child items no longer changes when folding or unfolding containers; this lets you keep invisible items inside containers;
  • when selection including a container and its child node is dropped into another container, the child node now remains in its original container;

PdfExporter improvements

  • improved handling of clip regions in custom drawing code;
  • PdfExporter now honors the target Rectangle property of linear gradients;
  • PDF shadings now include all colors from a ColorBlend;
  • more precise character widths set when text includes both eastern glyphs and Latin characters;
  • more precise widths set for Cyrillic characters;

New events

  • the SetSelfLoopShape event is raised when a link becomes a self-loop, giving you a chance to set a custom shape for the link;
  • QueryAlignTarget event is raised to determine if a node should be used as alignment guide target when AutoAlignNodes is enabled;

Miscellaneous

New in version 6.0.2

Preserve order in tree layout

The Balance property of TreeLayout can be set to Preserve to keep the original geometric order of child nodes when arranging them under their parent. This can be used to arrange tree branches in a specific order by first positioning them in increasing horizontal or vertical positions. Another possibility is to apply TreeLayout from NodeModified handler to let users rearrange the tree branches by dragging and dropping a node.

Item rendering improvements

Export improvements

Selection improvements

Miscellaneous

Fixed bugs

  • Click events were doubled for ControlNode objects added from code.
  • A crash when using the OverLongestSegment link text style without setting diagram's BackBrush.
  • Controls hosted inside ControlNode objects did not hide when their Layer becomes invisible.
  • Ruler alignment guides did not set the Dirty flag.
  • ZTop and ZBottom methods did not work correctly with layers.

New in version 6.0.1

Visual Studio 2012 support

MindFusion.Diagramming now includes support for Visual Studio 2012. The installer can create VS2012 toolbox palette for the component, and can optionally install VS2012 sample projects. In addition, toolbox palettes are now created for all .NET target frameworks supported by the respective Visual Studio versions.

Magnifier improvements

The size of the magnifier tool can now be specified independently on both axes through the MagnifierWidth and MagnifierHeight properties. The MagnifierRadius property has been removed. The shape of the magnifier tool can now be customized through the MagnifierShape property.

Ruler improvements

The ruler units can now be specified more precisely through instances of the new MeasureUnit class. The MeasureUnit class provides several built-in units as well as the opportunity to create custom units of measure. As a result, the RulerUnit enumeration has been removed and the type of the Unit property has been changed. The InchDivisions property of the Ruler class has been removed as well - the division information is now built into the MeasureUnit type and no longer needs to be specified explicitly. Custom divisions can still be specified for any unit by creating a custom MeasureUnit instance and providing the appropriate value in the standardDivisons constructor parameter.

Miscellaneous

  • Fixed a bug that prevented some diagrams that are using styles from loading;
  • VisioExporter.DynamicsOff can be used to disable dynamic link routing in Visio 2010 in order to preserve the position of control points from the exported diagram;
  • PdfExporter now creates PDF Bezier objects for Bezier curves in the diagram instead of approximating them with lines;
  • If VisioImporter.ApplyVisioUnit is enabled, the diagram's unit will be set to the one from the imported VDX file;

New in version 6.0

Styles and themes

The appearance of the items in a diagram can now be modified using styles. The style represents a set of properties, which can be applied to an individual diagram item (by assigning it to the DiagramItem.Style property) or to all items of a specific type (by using a Theme). The styles can be easily expanded to include the properties in derived item classes.

The theme represents a collection of styles. Each style in the theme is associated with the diagram items of a specific type and affects all items of this type. Themes can be loaded from XML files. New themes can be created using the Theme Editor tool. Several pre-defined theme files are installed under the Themes subfolder of the control's root installation folder.

For more information about this new feature, check Styles and Themes.

Diagram documents and tabbed views

The DiagramDocument class represents a collection of diagram pages or sheets, represented by DiagramPage objects. DiagramPage is derived from Diagram and only adds a Title property, so any current code that processes Diagram objects will work with DiagramPage objects too. New pages can be added to the document and existing pages can be removed and reordered via the Pages collection. The diagram document provides higher level of events for the pages contained inside it. The document supports the notion of an active page. The documents can also be exported to PDF and Visio, and imported from Visio using the new overloads available in the PdfExporter, VisioExporter and VisioImporter classes respectively.

The new TabbedDiagramView can be used to display DiagramDocument objects. The view displays tabs for the individual pages in the document. The active page can be changed interactively by activating its associated tab. New pages can be added and removed to/from the document through buttons in the tab tray and the pages can be rearranged by dragging their associated tabs with the mouse.

One-way graph Layout

The OneWayLayout class ensures that links enter into nodes from the same general direction and exit them from the opposite side. If the graph contains cycles, some links bend around the nodes to keep the enter/exit direction consistent. The algorithm aims to minimize the number of such links.

Rotation improvements

Multiple labels per link

The LinkLabel class allows multiple captions to be displayed for a single DiagramLink object. Link labels provide a set of properties allowing full customization of their display and positioning. Labels can also be arranged automatically to avoid overlapping nodes and other labels by setting LinkLabel.AutoArrange to true.

Node list control

The NodeListView is a ListBox control that can host any type of DiagramNode objects. Nodes from to the NodeListView control can be drag-and-dropped onto a Diagram, which creates a clone of the dragged node at the drop position.

Layers

Items can now be assigned to layers, and layers can be hidden, locked or moved up/down in the Z order as a group. Set the LayerIndex property of items to associate them with layers in the Diagram.Layers collection. The Layer objects provide Visible, Locked and ZIndex properties, which will affect all items in the respective layer. Layers also expose a Title property shown in the LayerListView control. Newly drawn items are added to the layer specified via Diagram.ActiveLayer.

For additional information about layers, refer to Layers.

Layer list control

The LayerListView control provides user interface for working with Layer objects. The control displays a list of all layers in a specified Diagram with a title and an overview area, and also allows editing of layer's Title, Visible and Locked properties and choosing the Diagram's currently active layer. New layers can be added to the Diagram by clicking the '+' button. The selected layer can be deleted by clicking the '-' button.

Parallel layouts

The .NET 4 version of MindFusion.Diagramming takes advantage of the Task Parallel Library (TPL) to enable parallelism on the different layout algorithms. Set the EnableParallelism property on the Layout class to true to enable arranging different subgraphs on different threads to possibly improve performance on multiprocessor systems. In addition, the maximum degree of concurrency can be manipulated through the MaxDegreeOfParallelism property. Note that only independent subgraphs are processed in parallel, so the SplitGraph property of layout classes that provide it must also be set.

Magnifier

The new magnifier tool allows users to interactively zoom in (or out) portions of the diagram by holding down a modifier key or pressing a mouse button. The magnifier's zoom factor and appearance can be customized. Additional information can be found in the corresponding section of Scrolling and Zooming.

Miscellaneous

  • The swimlanes grid is now rendered in Overview control;
  • The value of DiagramItem.ZIndex property is no longer required to be unique and smaller than the number of items;
  • The Shape property in ContainerNode and TreeViewNode can be set to Rectangle or RoundedRectangle;
  • Visual effects can be set on individual nodes via the DiagramNode.Effects property;
  • Diagram item collection types now implement the generic IList interface;

API changes

  • RotationAngle property moved from ShapeNode to base DiagramNode;
  • Inherited node classes should now override the DrawLocal method instead of Draw to get built-in support for node rotation. Overriding Draw still works, but any custom drawing code would have to take care of rotation;
  • Type of Group.FollowMasterRotation changed from boolean to enum GroupRotation;
  • LinkStyle enum renamed to LinkShape;
  • DiagramLink.Style property renamed to Shape;
  • TableStyle enum renamed to SimpleShape;
  • TableNode.Style property renamed to Shape;
  • The type of TextColor and CaptionColor properties have been changed to Brush; the properties have been renamed to TextBrush and CaptionBrush;
  • The default value of Pen, Brush and Font properties of items is now null (Nothing in Visual Basic) to allow for inheritance from DiagramItem.Style or Diagram.Theme. Custom drawing code in inherited classes should use the values returned by EffectivePen, EffectiveBrush or EffectiveFont to get the actual object that should be used when drawing;
  • ZLevelUp, ZLevelDown, ZTop and ZBottom methods now require a boolean argument specifying whether items are allowed to change layers;
  • ZIndex no longer corresponds to the position of items within Diagram.Items collection. Items however still contains the items sorted by Z order, as defined by item's ZIndex and LayerIndex;
  • Event handler delegates have been removed; events are now defined as generic EventHandler specialized via EventArgs type. For example the type of NodeCreated is now EventHandler<NodeEventArgs>;

For more detailed description of changes and additional information about how to move to version 6.0, check the Moving to MindFusion.Diagramming 6 topic.

New in version 5.8

Node effects

Two new visual effects can be applied to nodes - Glass and Aero. In addition, the existing Emboss and Smooth Shadow effects are now applied to all node types, not just ShapeNode.

A new API is provided to facilitate effects usage. To apply an effect, create an instance of one of the effect classes, set up its properties, then add the instance to the Diagram.NodeEffects collection. Currently, there are four effect types available - EmbossEffect, SmoothShadowEffect, GlassEffect, and AeroEffect. Effects can be added, removed or modified at any time and this will immediately reflect on the diagram. Effects of different types can be applied simultaneously. It is also possible to apply more than one effect of the same type.

The old EnableEmbossEffects and EnableShadowEffects properties are reworked internally to use the new effect pipeline. Turning these properties on will automatically add an instance of the appropriate class to the NodeEffects collection. Therefore clearing the NodeEffects collection will turn these properties off if they were previously enabled. Keep in mind that the Diagram.EffectsProvider property is still required in order to enable the Emboss and Smooth Shadow effects.

Composite layout improvements

The CompositeLayout exposes several new properties. The UseAdditionalPartitioning property can be set to true in order to enable additional partitioning pass after the default partition. This is especially useful when the initial partitioning produces a graph with nodes with many leaf children.

Solar layout

This variation of the fractal layout places child nodes around their parents, such, that the child nodes do not overlap. This layout also takes into consideration the size of the nodes and tries to arrange them to minimize occupied space. The layout can optionally prevent links from crossing nodes by bending them.

New in version 5.7

Automatic node alignment

If AutoAlignNodes is enabled, the node currently being drawn or resized is aligned to another node so that a pair of their vertical or horizontal sides become collinear. To specify the maximal distance at which nodes are aligned, set the AutoAlignDistance property. The pair of aligned nodes is indicated visually by drawing an alignment guide using the pen assigned to AlignmentGuidePen.

Fractal tree layout

FractalLayout is a tree layout algorithm that places child nodes symmetrically around their parent node. Nodes at the lowest level are arranged directly in a circle around their parent. At the upper level, the already arranged nodes form branches that are arranged in a circle around the new parent node. The algorithm is recursively repeated till the highest level is reached. If nodes in the tree have uniform number of children, the end result has fractal-like appearance (subsets of the graph look like scaled-down copies of the whole graph).

You can choose which node should be displayed at the center of the topmost circle by setting the Root property. If it is not specified, the algorithm automatically selects a root that leads to more balanced distribution of nodes.

CompositeNode extensions

Miscellaneous

New in version 5.6.4

Link auto-snapping

Now links can automatically connect to the nearest diagram node without the mouse pointer reaching the node. This is enabled by setting the AutoSnapLinks property. The maximum distance at which auto-snap works can be specified through AutoSnapDistance. The LinksSnapToBorders property, which implemented similar functionality when the mouse is directly over a node, has been removed.

Components serialization

CompositeNode components are now automatically serialized when saving in binary or XML format. It is also possible to serialize custom components by overriding the SaveTo, LoadFrom, SaveToXml, LoadFromXml methods of ComponentBase. Saving all components along with their attributes could lead to a lot of wasted space for node types derived from CompositeNode that have the same component hierarchy. In such scenarios, override the SerializeComponents method and return false to stop component serialization, and save only the relevant node properties by overriding the SaveTo, LoadFrom, SaveToXml, LoadFromXml methods of CompositeNode.

Miscellaneous

  • WmfExporter now also renders the LaneGrid in the exported WMF drawing.
  • GetNearestNode returns the node that is closest to the specified point.
  • NodeClicked and LinkClicked are raised for items shown in DiagramView3D.
  • 3D positions of items specified via LayoutTraits[View3D.Position] are now serialized, both in binary and XML format.
  • GetProjectionOrigin method added to DiagramView3D.

    New in version 5.6.3

    CompositeLayout algorithm

    CompositeLayout partitions the diagram into several subgraphs and applies the algorithm specified via the SubgraphLayout property on each part. If the part is a tree, it is arranged using the algorithm specified via the SubtreeLayout property, which is set to a radial TreeLayout instance by default. Finally the algorithm specified via MasterLayout is applied on the graph that represents the overall partition. By running the polynomial-complexity layout algorithms on small subgraphs, CompositeLayout is able to process a large graph much faster than if a layout algorithm is applied on the whole graph.

    CompositeLayout can run on custom partitions specified as lists of nodes, or automatically partition the diagram via two automatic methods based on graph connectivity and graph path lengths. Set the PartitionMethod and CustomPartition properties to specify how the diagram should be partitioned.

    Miscellaneous

    • If there is only one used execution path after a branching and up to two empty ones, FlowchartLayout will now center the used path under the branching start node.
    • OrthogonalLayout now produces more compact layouts with less link bends if MinimizeLinkBends is enabled.
    • The DisableMirroring constraint prevents users from flipping a node by dragging a handle over the opposite node side.

    New in version 5.6.2

    Dynamic node shapes

    Shape instances can be defined using custom code that takes into consideration the current width and height of nodes. This allows creating shapes whose primitive elements change non-uniformly, e.g. by growing only in width or height when a node is resized. There are two ways to create such shapes. The first one is to use the Shape constructor that takes a CreatePathDelegate parameter, which can be implemented using a .NET function. Another Shape constructor takes a string argument that represents a Visio-like shape formula evaluated in run-time. The latter method enables serializing the shape code in external files, which can be reused by different applications and by MindFusion components for other platforms.

    SpringLayout improvements

    • Better handling of large nodes and nodes with non-uniform size.
    • The SpringLayout energy model has been changed to one that leads to better symmetry in the arranged graphs. The old model can still be used by setting LayoutMethod to Classic. This is recommended when using rounded links.
    • The Randomize property allows starting the layout process from random node positions.

    New in version 5.6.1

    Export/Import improvements

    CompositeNode improvements

    Miscellaneous

    • Fixed an issue where DiagramView and Ruler appeared in the components tray instead on the form surface if the respective design.dll assemblies could not be loaded.

    New in version 5.6

    Components

    A new component subsystem is now available for use in MindFusion.Diagramming. The components represent graphical widgets similar to controls, which can be arranged in hierarchies and added to a Diagram through instances of the new 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. A new tutorial section has been added describing various component features in a step-by-step examples. To check it out, visit Using Components.

    Miscellaneous

    • SvgNodes now support SVG text and marker elements.
    • NodeHovered and LinkHovered events are raised when the mouse hovers over a diagram item.
    • The Ruler.InchDivisions property specifies how many minor divisions to display when Unit is set to Inch.
    • Derived item types can control the position of attached nodes by overriding UpdateGroup.

    New in version 5.5

    Export to SWF (Adobe Flash) format

    SwfExporter creates Adobe Flash files representing the content of a diagram. In order to use this component, add references to the MindFusion.Diagramming.Export.Swf.dll and MindFusion.Swf.dll assemblies to your project. To export a diagram to SWF file, create an SwfExporter instance and call its Export method, passing a Diagram object as parameter. At the time of writing this, the diagram is exported as static image; interactivity is planned for next releases.

    CascadeLayout algorithm

    CascadeLayout places nodes on a virtual grid and arranges links orthogonally, such that if the source graph is planar all links are guaranteed to have no more than two bends and will not intersect. By default the layout method arranges nodes in rows and link segments in columns; this can be changed by setting the Orientation property.

    TriangularLayout algorithm

    TriangularLayout places nodes on a virtual grid, such that if the source graph is planar, all links are guaranteed to have a single segment and not intersect. If the graph is not planar, its intersecting links can be optionally segmented and bended in order to improve readability. The layout method places the nodes from the external face on a triangle and recursively adds the rest of the nodes as vertices of internal triangles. As a result, it is very effective for near maximal-planar (a.k.a. triangular) graphs.

    HierarchicalLayout algorithm

    HierarchicalLayout places nodes on user-defined levels, such that if the source graph is level-planar, all links are guaranteed to have a single segment and will not intersect. A graph is considered level-planar if it is possible to draw it without link intersections when its nodes are positioned on predefined levels. The layout method requires that for each node LayoutTraits contains a HierarchicalLayoutTraits.Level entry specifying the level, and no two connected nodes must be on the same level.

    Miscellaneous

    New in version 5.4

    Swimlane layout

    SwimlaneLayout can be used to arrange process diagrams in which nodes representing activities are placed in swimlanes representing resources. The index of the resource allocated to an activity should be assigned to the corresponding node's LayoutTraits[SwimlaneLayoutTraits.Lane].

    By default, the algorithm works with the diagram's LaneGrid, but its SwimlaneGrid property can be set to any class that implements ISwimlaneGrid. This allows applying the layout to a custom-drawn grid rendered through the DrawBackground event, or one composed of locked background nodes.

    Export diagrams to WMF format

    WmfExporter creates WMF (Windows MetaFile) images from the content of Diagram objects. In order to use this component, add a reference to the MindFusion.Diagramming.Export.Wmf.dll assembly to your project. To create a WMF file from a diagram, create a WmfExporter instance and call its Export method, passing a Diagram object as parameter.

    Other export improvements

    • SvgExporter supports dashed pens.
    • Support for shapes with alternating fill style added to PDF and SVG exporters.
    • Improved quality of curved shapes in SVG.
    • PdfExporter supports bitmaps with Format32bppPArgb pixel format.

    Text formatting improvements

    • TextPadding specifies the size of the padding area between the text of nodes and their borders.
    • Speed of the styled text formatting algorithm has been improved.

    Miscellaneous

    New in version 5.3.5

    Support for .NET 4

    The package now includes a .NET 4 version of the MindFusion.Diagramming assembly, available in the VS2010 subfolder of the installation folder. That subfolder also includes sample projects for Visual Studio 2010. Versions 2 and 3 of the .NET runtime are still supported.

    Miscellaneous

    • The Toolbox Installer tool can be used to automatically add the MindFusion.Diagramming components to a tab of the Visual Studio toolbox.
    • The Id property added to DiagramItem allows assigning custom identifiers to items. It can also be used to just store additional custom data similarly to Tag.
    • Call FindLinkById and FindNodeById to find items by their Id.
    • Shadows can be painted using any brush type and not only in solid color. The ShadowColor property has been replaced by ShadowBrush.
    • The FoldedContainerSize property allows setting the size of folded containers to be larger than their caption bar.
    • ShapeNodes whose Brush is set to a PathGradientBrush instance now use a gradient path corresponding to their Shape instead of a rectangle.

    New in version 5.3.4

    Support for custom arrowheads

    The type of the HeadShape, BaseShape and IntermediateShape properties of DiagramLink has been changed from enum ArrowHead to class Shape, which is also used to define ShapeNode shapes. The ArrowHeads class now exposes Shape definitions that correspond to the ArrowHead enumeration members from previous versions. It is also possible to assign any Shapes member or a custom shape as an arrowhead. When used for arrowheads, position (50, 0) in the shape definition corresponds to the arrowhead's tip point.

    Additional arrowhead enhancements

    Miscellaneous

    • The ShapeDesigner tool now supports filled decoration objects (used in BPMN shapes).
    • ShapeDesigner allows drawing the shape's text region outside the shape outline.
    • HitTest method added to TreeViewNode.
    • A new LoadFromXml overloaded method allows loading diagram items without changing the diagram's properties.
    • UBendMaxLen property added to QuickRouter.

    New in version 5.3.3

    SvgNode improvements

    • The static FromSvg method of the Shape class creates a shape corresponding to the outline of an SVG drawing.
    • The ContentAlign property of SvgNode specifies how a drawing is aligned relatively to the node.
    • Improved support for gradients.
    • SvgContent can parse files with embedded CSS styles.
    • Fixed a bug in rendering of curves in SVG.

    Adjustment handles styling

    The ActiveItemHandlesColor, SelectedItemHandlesColor and DisabledHandlesColor properties have been replaced by ActiveItemHandlesStyle, SelectedItemHandlesStyle and DisabledHandlesStyle. The HandlesVisualStyle objects returned by them provide sub-properties for greater control over the appearance of selection handles. The adjustment handles can now be painted not only in solid color but with arbitrary brushes, such as LinearGradientBrush and TextureBrush objects.

    Miscellaneous

    New in version 5.3.2

    Topological graph layout

    If the underlying graph if acyclic, TopologicalLayout arranges the nodes linearly in such a way that each node comes before all destination nodes of its outgoing links. The links are drawn as curves above the chain of nodes, with their height proportional to the distance between the nodes. If the graph is not acyclic, the layout algorithm finds an ordering with a minimal number of back links, and draws the back links below the chain of nodes.

    Relationship queries

    The Query method of DiagramItem can be used to find items that can be reached from the current one by following a path described in the query expression specified as argument. The expression includes selectors separated by a / character, where each selector returns the items from the result set of the previous step. The expressions can also include boolean predicates that filter the results using boolean and arithmetic expressions.

    PdfExporter multi-language support

    The PdfExporter component now should automatically recognize the language of the items labels and apply the correct encoding in the exported PDF documents. Apart from the standard Western character set, officially supported are Chinese, Japanese, Korean and Central-European character sets.

    Miscellaneous

    Fixed bugs

    New in version 5.3.1

    TreeViewNode enhancements

    Miscellaneous

    New in version 5.3

    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.

    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.

    BPMN shapes

    This version adds predefined Shape definitions that implement the Object Management Group / Business Process Management notation. They are available as members of the Shapes class and have names that start with a Bpmn prefix. They can also be accessed by ID using the FromId method of Shape.

    Edit graphs in 3D

    Now DiagramView3D can be used to edit graphs in 3D space. Set the Behavior property to a value different than DoNothing to allow users select and modify existing items or draw new ones. New items are drawing in a plane in front of the camera, orthogonal to the camera direction. The distance from the camera to this plane can be specified through the CreationPlaneDistance property.

    Flowchart graph layout

    FlowchartLayout recognizes program code -like patterns in the graph, such as loops, sequences and if/switch branching, and arranges them recursively. FlowchartLayout could be used to arrange other types of graphs as well, though with some restrictions. For example it treats all back links as loops in the code, and expects that they are nested - loop links starting closer to the stop node should end closer to the start node. Another similar restriction is that there shouldn't be any cross-links that connect different branches of a decision sub-graph.

    Link routing enhancements

    A much faster link routing algorithm has been implemented. It can arrange a thousand links for just a few seconds, while older versions would require several minutes. Now it is also possible to create custom routing classes to be used when a link must be routed by implementing the ILinkRouter interface. An instance of such class can be set through the LinkRouter property of the Diagram. MindFusion.Diagramming provides two classes that implement ILinkRouter - GridRouter and QuickRouter. By default LinkRouter is set to a QuickRouter instance.

    LayeredLayout enhancements

    • If the underlying graph allows that, nodes can be assigned to layers in a way that allows all links to point to the same direction. To enable that, set EnforceLinkFlow. Note that with this option the layout might cover a larger area and lead to more link crossings.
    • Nodes can be assigned to specific layers by assigning a Layer key to their LayoutTraits property. To enable support for custom layers, set EnableCustomLayers.

    Miscellaneous

    New in version 5.2.1

    Miscellaneous

    • The FindAllPaths method of PathFinder has been optimized to run faster.
    • The ReassignAnchorPoints method added to DiagramNode distributes all links connected to a node evenly among the available anchor points.
    • Now SvgExporter can export Shape objects that do not contain outline definition.
    • The EndPointsOffset property added to RoutingOptions lets you ensure that the first bend a link makes is not too close to the node border.
    • The <, > and & symbols can be displayed when styled text is enabled by means of the &gt;&lt; and &amp; escape sequences.
    • Now all assembly names from the MindFusion.Diagramming package start with a MindFusion prefix.

    Fixed bugs

    New in version 5.2

    OrthogonalLayout

    The OrthogonalLayout class implements an orthogonal graph layout algorithm. Each link is drawn as a chain of alternating horizontal and vertical segments. Nodes are placed in a way that facilitates few links bends and crossings. This algorithm was designed for planar graphs where the nodes have at most four incident links, and produces best results with such graphs as input. It can arrange any arbitrary graph as well, by adding some dummy nodes and links to planarize the graph and reduce its vertex degree, and removing them after the layout.

    CircularLayout

    CircularLayout distributes nodes evenly on the circumference of a circle at positions that result in as few link crossing as possible. Set its Radius property to specify the size of the layout circle. Use SiftingRounds to set the number of fine-tuning crossing-reduction iterations.

    Lane grid enhancements

    • The cells of the lane grid can display text, that can be set and customized via the Text, TextColor, TextFont and TextFormat properties.
    • Users can insert new lanes by clicking a divider line between headers while holding CTRL.
    • New lanes can be inserted programmatically by means of the InsertBefore and InsertAfter methods.
    • HeaderAdded event raised when a lane is added either interactively or programmatically.
    • The HeaderResized and HeaderStartResizing events are raised when the user resizes lanes.

    Miscellaneous

    • The EnableAssistants property of TreeLayout allows creating organizational charts as in MS Office.
    • The LinkHitDistance property lets you specify the furthest distance from links that a click would be considered a hit.
    • Link labels are now rendered in DiagramView3D.
    • The DrawForeground event lets render custom graphics in the diagram foreground.
    • SnapToNodeBorder is now also considered while creating links.
    • UnfoldedSize property added to ContainerNode.
    • The AnchorPattern property of Shape lets you associate anchor points with shape definitions.
    • Now it is not required for Shape definitions to contain outlines.
    • The ToolTipControl property lets you access the System.Windows.Forms.ToolTip control used by MindFusion.Diagramming.

    API changes

    • The OrthogonalLayout class from previous MindFusion.Diagramming versions has been renamed to OrthogonalRouter.
    • Saving and loading Shape definitions are now both done via the XML DOM API, and the respective methods have been renamed to SaveToXml and LoadFromXml.

    New in version 5.1.1

    Speed improvements

    The following algorithms have been optimized greatly for speed:

    • GridLayout graph layout algorithm;
    • SpringLayout graph layout algorithm;
    • Link routing algorithm;
    • Polygonal and styled text layout;

    Binary tree layout

    The TreeLayout algorithm can produce a grid drawing of a full binary tree, aligning child nodes either horizontally or vertically to their parents in a way that the layout covers minimal area. To apply this layout, set the Type property to HorizontalVertical and call Arrange.

    Miscellaneous

    API changes

    • TreeLayoutDirection has been renamed to TreeLayoutDirections.
    • The default value of Diagram.Font has been changed to "Times New Roman, 9pt".
    • The Draw method of ArrowHeadShape has been made public.

    Fixed bugs

    • The LinkModified event not raised when link becomes a self-loop.
    • PdfExporter changing black color in images to transparent.

    New in version 5.1

    Display graphs in 3D

    Now you can assign 3D positions to diagram nodes, and display their projections on screen using the DiagramView3D control. 3D positions are set through the LayoutTraits property of nodes by associating a Point3D value with the View3D.Position key. The size of nodes is inferred from their Bounds property. The CameraPosition and CameraRotation properties let you specify the position of the camera within the 3D scene. The nodes are always rendered as if facing the camera, i.e. you cannot view them edge on.

    SpringLayout enhancements

    • The simulated physical process used in SpringLayout can be animated. Use the BeginArrange method to prepare the layout object for animation. Call Iterate from a timer event handler to run a few iterations of the process and update the node positions. Finally, call EndArrange to free the resources allocated by the algorithm.
    • The Layout3D property of SpringLayout can be used to arrange nodes in 3D space instead of setting their 2D positions. A graph arranged with this option can be displayed using the DiagramView3D control.
    • Now SpringLayout produces more symmetrical layouts when possible. With this feature, the algorithm might have to run for more iterations than older versions until a good configuration is reached. However, this should be offset by the optimized running time for each iteration.

    PdfExporter enhancements

    • The EnableBackground property specifies whether the background of PDF pages should be painted using the diagram's BackBrush.
    • The DefaultEncoding property lets you specify a far-eastern text encoding.

    Miscellaneous

    API changes

    New in version 5.0.3

    Visual Studio 2008 support

    The MindFusion.Diagramming package now includes .NET 3.5 assemblies and sample VS2008 projects.

    Using custom in-place edit controls

    The CreateEditControl event lets you use any Windows Forms control to allow users edit the content of a diagram item. This event is raised when entering in-place editing mode, either by double-clicking an item or when the BeginEdit method is invoked. You could handle the event to return a composite control for editing many of the item's properties, and not only the text. When leaving in-place editing mode, the DiagramView raises DestroyEditControl to let you copy to the item any values entered by the user and close the custom editor.

    Table improvements

    • The ValidateAnchorPoint event identifies which row contains the related anchor point through the TableRow argument.
    • A new overload of the ResizeToFitText method allows preserving the width of cells.
    • Improved how the shape of reflexive links is set when a link connects rows of the same table.

    Container improvements

    • Two new events, ContainerChildAdded and ContainerChildRemoved are raised when nodes are added to or removed from containers.
    • Now the Arrange method overload taking DiagramItemCollection as parameter can be used to arrange items in a container.
    • Now routing a link between nodes in a container works without setting the container's Obstacle property to false. With this, the container's borders are still considered an obstacle, and outside links will look for a route around the container.
    • Performance of container nodes in a multiple selection has been improved
    • Containment of links consisting of several segments has been improved.
    • Fixed how Dynamic links behave when connected to a node in a folded container
    • Improved how the container size is updated when moving nodes within a container.

    Miscellaneous

    API changes

    New in version 5.0.2

    Layout algorithm improvements

    • In older versions the layout algorithms placed unconnected subgraphs either in a row or in a column. Now it is possible to place the unconnected subgraphs in such a way that the diagram covers a minimal area. To enable that, set MultipleGraphsPlacement to MinimalArea.
    • Now OrthogonalRouter supports nodes of different sizes and can handle a much larger number of links. It no longer requires the nodes to be aligned, so the BaseLayout members related to node alignment have been removed.
    • The FlowLayout class exposes new type-safe properties and methods to define layout behavior that previously could be set only through the AddLayoutRule method.

    Font scaling

    It is no longer necessary to use GraphicsUnit.World to make the fonts scale when zooming the diagram view or displaying the diagram inside an Overview control. Now the fonts are scaled correctly regardless of their Unit.

    In-place editing enhancements

    Now the text of ContainerNode and DiagramLink objects can be edited in place too. In addition, the BeginEdit method of DiagramView and the InplaceEditable interface have been changed to allow choosing the edit box location according to the current mouse position. At this time, this is used in the DiagramLink in-place editing implementation, but you could use it for your own item types.

    Note that if AllowInplaceEdit is enabled, the user will be able to edit the text of links and containers by double-clicking them. If that's not desired for these types of items, handle the LinkTextEditing and NodeTextEditing events to prevent the in-place edit operation.

    Improved design time support

    • Now there are type converters provided for the RectangleF and SizeF types, which lets you assign values to properties of these types using the design-type property grid.
    • Dropping a DiagramView onto a form will automatically add a Diagram instance and associate it with the view.

    PdfExporter fixes

    • Fixed a bug where PdfExporter would crash when using Color.Transparent as the fill color of items.
    • Fixed a bug where PdfExporter would generate incorrect PDF documents for some system locale settings.
    • In addition, the PDF generation speed has been improved. Now PDFs can be generated 2-3 times faster, depending on how much text is used in the diagram being exported.

    Miscellaneous

    • The DelKeyAction property of DiagramView specifies whether the control should delete all selected items or just the ActiveItem when the user pressed the Del key.
    • The Route method of DiagramLink now returns a boolean value indicating whether a route has been found successfully.

    API changes

    New in version 5.0.1

    Hyperlink support in SvgExporter and PdfExporter

    SvgExporter and PdfExporter can create hyperlinks when the HyperLink property of items is set. The type of hyperlinks to create is defined via the HyperLinkStyle property, available for both export components. SvgExporter provides an additional HyperLinkTarget property, which defines the target window of the hyperlink.

    Text wrapping enhancements

    Previous versions of the control supported wrapping text to a new line only at word boundaries. Now the default is to split words into multiple parts if there is not enough space to fit a whole word. If you prefer the old behavior, set the Trimming member of TextFormat to StringTrimming.Word.

    Now you can disable the automatic text wrapping by enabling the NoWrap flag in the FormatFlags member of TextFormat. If automatic wrapping is disabled and there isn't enough space to fit the whole line, the text is clipped at the node boundaries.

    Improved layout algorithms

    • Now LayeredLayout can arrange the diagram links orthogonally, as specified through the LinkType property.
    • LayeredLayout can arrange nodes of varying size without overlapping. To enable that, set IgnoreNodeSize to false.
    • The AnnealLayout performance has been improved.
    • AnnealLayout can arrange nodes of varying size without overlapping.

    FlowLayout graph layout algorithm

    The FlowLayout algorithm can be used to lay out flowcharts and process diagrams. It works by applying a customizable set of rules for local positioning of connected nodes relatively to each other. On a larger scale, the algorithm keeps groups of nodes separate and prevents links between the groups from crossing nodes. The FlowLayout and ProcessLayout examples included in the MindFusion.Diagramming package demonstrate two sample sets of layout rules.

    Improved support for containers

    Miscellaneous

    • The CreatePrintDocument method lets you display the diagram in a PrintPreviewControl hosted in your own forms.
    • The control raises a DrawBackground event before drawing the alignment grid and the diagram items. This lets you render your own background graphics.
    • The Draw method of the Diagram class is now virtual. You can override it in a derived class to do additional drawing on top of what is rendered by default.
    • OnClick, OnDoubleClick and OnModify overridable methods have been added to the DiagramItem class.
    • The SvgExporter can export images to external files, as specified via the ExternalImages property.

    API changes

    • The BreakOff member of the LinkCrossings enumeration has been renamed to Cut.
    • The Margins property of layout classes replaces the XGap and YGap properties.

    New in version 5

    Document/View Architecture

    MindFusion.Diagramming implements the Model-View-Controller (MVC) architectural pattern in its new version 5. The MVC design pattern as applied to MindFusion.Diagramming separates the diagram data (model) from its representation to the user (view) and controlling it by the user (controller).  According to the MVC design pattern, MindFusion.Diagramming Version 5 provides two new classes instead of the FlowChart class, namely Diagram and DiagramView. For more information, take a look at this topic.

    Support for Custom Diagram Item Types

    The MindFusion.Diagramming API has been redesigned to allow for seamless integration of custom node and link types. You can define a custom item type by deriving from DiagramLink or DiagramNode. You could also derive from more specific node types such as ShapeNode or ContainerNode. New items can be added to a diagram by instantiating them and adding them to the Nodes or Links collections. To improve support for custom types, many type-specific methods have been replaced with more generic versions, for example, FindNode instead of FindBox and FindTable. For more information on the API changes, take a look at the Moving to MindFusion.Diagramming 5 section of the help file.

    Containers

    The ContainerNode class implements diagram nodes that can function as containers for other nodes. Containers can be folded to hide their content, and unfolded to show it again. Containers can be nested one within another, without limitation on the depth of nesting.

    Orthogonal Graph Layout

    OrthogonalRouter is a secondary layout algorithm that can be used to arrange links after an initial node arrangement has already been applied. The orthogonal layout is useful when there are much more links than nodes in a graph. The algorithm strives to achieve the following criteria, while preserving as much of the initial node configuration as possible: links must not overlap; only vertical and horizontal routing lines are used; graph routing is performed with respect to the specified main layout direction; links crossings are minimized; bends are minimized.

    IGraphics Interface

    Now all drawing is done through an IGraphics interface, for which the control provides GdiGraphics, SvgGraphics and PdfGraphics implementations. Thus the files created by SvgExporter and PdfExporter can contain custom-drawn elements, which you draw either by handling custom drawing events or by implementing the Draw method in your custom item types.

    API Changes

    Conformity with the .NET Framework naming conventions has been improved. For more information on the API changes, take a look at the Moving to MindFusion.Diagramming 5 section of the help file.