Search
What's New in this Release

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

Version 2

Paged containers

PagedContainerNode is a ContainerNode subclass that organizes its child nodes into a collection of Pages, represented by ContainerPage objects. This allows for the creation of more orgainzed diagrams where nodes can be grouped into logical views within a single container. Only the nodes belonging to the currently active page, specified by CurrentPage property, are rendered and participate in user interactions.

Navigation between pages is handled by scroll arrows in the caption bar, allowing users to cycle through the pages sequentially. For faster access, users can also double-click the container's caption to open an in-place combo box listing available page titles, enabling direct navigation to any page. The node's Caption automatically displays the Title of newly activated ContainerPage.

The appearance of pager arrows can be fully customized by implementing a PageIconRenderer and assigning it to the static Renderers.PageIconRenderer property, allowing for custom drawing logic, images, or SVG icons.

ItemLabel image

New Image property added to ItemLabel lets you display icons along a link's geometry, or add more images to a ShapeNode. If a label contains both Text and Image, their relative position is specified by ImageAlign property (by default the image is placed on left side of text), and distance by ContentPadding. The image is rendered using bitmap's intrinsic size, unless you override it by setting ImageSize property. You can treat label images as clickable icons by handling LinkClicked or NodeClicked events and checking label argument passed to their handlers.

ItemListView component

ItemListView supersedes NodeListView and lets you show both nodes and links in the list. Items can be added by calling AddItem method, and removed by calling RemoveItem. DefaultNodeSize property from NodeListView is called NewInstanceSize in the new class. The AutoConnectLinks and AutoConnectDistance properties control whether links created via drag-and-drop should connect to nearby nodes in the target diagram. ItemListView also provides more properties for customizing the list layout, such as Columns and LabelPosition. For compatibility with legacy code, NodeListView won't be removed from the library, bit it won't be getting any new improvements.

Palette component

The Palette control represents a tool palette that displays DiagramItem objects grouped into categories. It implements Accordion user interface that displays ItemListView components as its child panels, and category icon, title and collapse/expand button in pane headers. Each child ItemListView displays the items added to its corresponding category. Call the AddCategory method to define a category and create its respective accordion pane. Call AddItem to add an item to specified category. Palette provides same layout and appearance properties as the ItemListView class.

Overview component

Overview provides a scaled-down view of a target DiagramView, helping users work with larger diagrams. A tracker rectangle shows current viewport of the main DiagramView, and by dragging it users can change the scroll position. It can also be resized to zoom the target view.

Miscellaneous

  • Locked property added to ItemLabel. It lets you prevent users from editing label's text, and moving it when Behavior is set to MoveLabels.
  • PatternRouter improvements.
  • Label argument now provided with item click and double click events.
  • JSON serialization fixes and improvements.

API changes

Per-node-type behavior classes have been replaced by generic classes with a factory delegate / lambda parameter. E.g. if you were subclassing LinkShapesBehavior, now you'd have to replace base class with LinkNodesBehavior<ShapeNode>. New classes also let you avoid subclassing if you only need to specify the node type drawn by users:

C#  Copy Code

diagramView.CustomBehavior = new LinkNodesBehavior<MyNode>(
    diagramView, diagram => new MyNode(diagram));