Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic MindFusion.WPF Pack, 2022.R2 (Read 2155 times)
Forum Admin
YaBB Administrator

Rock and Roll

Posts: 694
Joined: Apr 6th, 2003
MindFusion.WPF Pack, 2022.R2
Dec 12th, 2022 at 5:53pm
Print Post  
We have released MindFusion.WPF Pack 2022.R2. It adds following new features and improvements:


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:

Select All
var rightZigzag = new RoutePattern();
 new RouteStep(RouteStepKind.AdvanceRelative, 0.5f));
 new RouteStep(RouteStepKind.TurnRight));
 new RouteStep(RouteStepKind.AdvanceRelative, 1));
 new RouteStep(RouteStepKind.TurnLeft));
 new RouteStep(RouteStepKind.AdvanceRelative, 0.5f));

// this can be defined in shorter form using a pattern string
// var rightZigzag = new RoutePattern(
//     "ADR0.5 TRR ADR1 TRL ADR0.5"));

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 router 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.

SvgExporter improvements
  • Item's Opacity is set as SVG "opacity" attribute.
  • Item's FontWeight is set as SVG "font-weight" attribute.
  • Fixed text left padding in SvgExporter.
  • SvgExporter sets more precise font size.

SvgNode improvements
  • The ContentAutoBounds property specifies whether to calculate content bounds from SVG elements' coordinates, or to honor the drawing's viewbox.
  • SvgNode now displays bitmaps embedded in SVG content.
  • SvgNode now supports dashed lines in SVG content (defined via stroke-dasharray attribute).
  • Fixed index exception in SvgNode when path coordinates are delimited by new-line characters.

New grouping types
  • Attach to fractional position of main node and keep attached node's size by calling AttachToFractionalPosition method of Group or respective AttachTo overload.
  • Implement custom group positioning by calling AttachCustom and overriding UpdateGroup. The UpdateGroup override must set the position of attached nodes by calling their SetBounds method.
  • Attach a node to a point from link's geometry (not necessarily a control point) by calling AttachAlongLinkLength method of Group or respective AttachTo overload. The group preserves original distance from node to the point along link's length, regardless of the number and shape of link segments.

  • Disabling AvoidOverlaps property of RoutingOptions lets you create routes with overlapping segments.
  • EnableParallelism and MaxDegreeOfParallelism layout properties now available in CoreCLR assemblies (.NET Core 3 and 5+ versions).
  • Intersects methods changed to public virtual to allow overriding them in custom item classes.
  • The ResizeType property of LaneGrid allows setting interactive row/column resize mode that preserves total grid size by subtracting resize amount from lane adjacent to the resized one.

API changes
  • Suspend and Resume methods removed from ILinkRouter. Call Diagram's SuspendLinkRouter and ResumeLinkRouter methods instead.
  • Default Diagram.LinkRouter changed from QuickRouter to CompositeRouter instance.
  • bool SmartPolylineEnds property of RoutingOptions replaced by PolylineRouting enum property, which also provides an option to prevent inclined link segments for LinkShape.Polyline routes.

Installer for the latest version can be downloaded here, or from the clients area on our site:

Updated assemblies are also available as MindFusion.Pack.Wpf NuGet package.

Back to top
IP Logged
Page Index Toggle Pages: 1
Send TopicPrint