Release Notes yFiles WPF Version 4.1
Version 4.1.0.0 is the latest release for yFiles WPF in the yFiles WPF 4.1 major release series.
See the changelog for a list of all
changes in this and all other versions.
Below you will find the technical requirements and a list of all new features and improvements.
Technical Requirements
- Microsoft .NET 6.0 (or newer) or Microsoft .NET Framework 4.6.2 (or newer).
- A browser to view the HTML documentation.
- We recommend the use of a powerful IDE such as Microsoft Visual Studio or JetBrains Rider.
All changes
Version 4.1
yFiles WPF 4.1 is an incremental update that builds on the extensive changes introduced in the 4.0 release. It brings exciting new features, helpful improvements and bug fixes to all parts of the library. As always, there is a large number of new and improved demos demonstrating these features and improvements.
If you are updating from an older version of yFiles WPF, have a look at the list of incompatible changes and at the Migration Guide.
New Features, Improvements, and Bug Fixes
Categories: General Controls Graph Styles Interaction Tooltips and Popovers GraphML Layout Hierarchical Layout Bundled Edge Router Organic Layout Circular Layout Other Layouts Analysis Documentation and Demos
General
New Features and Improvements
-
yFiles now is shipped with
NuGetpackages. -
The new static methods
RectD.SumandRectD.FromPointscalculate the bounding rectangle of an enumerable of rectangles or points, respectively. -
The
Table.CreateRow,Table.CreateColumn,Table.SetSize,Table.SetMinimumSizemethods and theStripeDefaults.SizeandStripeDefaults.MinimumSizeproperties now throw an exception if negative,NaN, or infinite values are passed.
Controls
New Features and Improvements
-
The new
HeatMapRendererclass can render a heat map. It simulates heat dissipating from nodes and edges and renders it with customizable color gradients. The new Heat Map Demo shows how to use theHeatMapRendererclass. -
The
UIElementExporterclass has been introduced as anUIElement-based wrapper aroundCanvasControl.ExportContent. It returns a layoutableUIElementthat automatically applies the necessary transforms, clipping, margins, and sizing, making it ready for direct use in WPF controls such asContentControlor Button. Custom background and foreground decorations can be added by overriding theRenderBackgroundandRenderForegroundmethods. -
In
TableEditorInputMode, selected stripes, stripes being resized and the source where stripes are dragged from are now highlighted with a transparent secondary fill in addition to the secondary stroke. -
The return type of
CanvasControl.ExportContenthas been changed from Visual toUIElement.
Bug Fixes
- The bend indicators displayed for selected edges in theme variants "Square" and "SquareHatched" have been replaced by diamonds.
-
Fixed a problem when only one of the managers for highlights or selection get replaced in
GraphControlwhere their domain property value of the other one became defunct. - Self-loops without bends are now rendered correctly in the overview.
-
Ending a drag gesture with a touch device no longer raises a spurious
PointerMoveevent. - Mouse, Touch, and Stylus now properly release the capture after a pointer up outside the canvas.
-
Ending a drag gesture with a touch device no longer raises a spurious
PointerMoveevent. -
Fixed a possible exception when accessing visuals in the
CanvasControl's visual tree in a certain order viaVisualTreeHelper.GetChild.
Graph
Bug Fixes
-
The
BendLocationChangedevent now uses the correct value for the y coordinate of theoldLocation. - Self-loops without bends are now rendered correctly in the overview.
-
Fixed, that setting
CollectionModelManager.EnabledcalledOnDisabledfor true andOnEnabledfor false. -
InteriorNodeLabelModel.GetMinimumNodeSizenow returns the correct size when the label model has non-uniform padding. - Fixed several undo units that triggered adding new undo units during their undo/redo operations.
-
Fixed
DefaultGraph.CreateNodecallingInvalidateDisplaystwice. -
Fixed a bug that caused a
NullReferenceExceptionwhen accessing elements of the result ofIGraph.InEdgesAt()using the indexer. - Fixed stale IDs not being cleaned up when an edge’s folding state changes without adding a view edge.
Styles
New Features and Improvements
-
Squircle shapes are now available for node and label styles. The
RectangleNodeStyle,ShapeNodeStyleandLabelStyleclasses support this shape type via the new enum valuesShapeNodeShape.Squircle,CornerStyle.SquircleandLabelShape.Squircle. -
The
LabelStyleclass now supports text wrapping in squircle shapes via the new enum valueTextWrappingShape.Squircle. -
The new
BridgeManager.MaximumBridgeWidthproperty allows bridges to be made wider for flatter intersection angles in order to maintain a constant distance from obstacles. -
The selection, highlighting and focus visualization of edges using custom styles that decorate
ArcEdgeStyleorBridgeEdgeStyleno longer disappears too early if the edge path is only partially in the viewport. -
The
CollapsibleNodeStyleDecoratornow has aButtonSizeproperty that allows customizing the size of the collapse/expand button on grouped nodes.
Bug Fixes
- Bridges of polyline edges are no longer included in selection, highlight, or focus.
-
Fixed
ShapePortStyle.Clone()to create an independent copy instead of sharing internal style state with the original instance. >
-
Fixed
ArcEdgeStyle's,BezierEdgeStyle's,BridgeEdgeStyle's, andPolylineEdgeStyle'sUpdateVisualimplementations to properly work withnullpens. Previously, changing the path on an edge that used one of these styles with anullpen and no arrows triggered aSystem.ArgumentOutOfRangeException. -
The
CompositeEdgeStyle.Clonemethod,CompositeLabelStyle,CompositeNodeStyle, andCompositePortStyleno longer mutates the original object's internal styles array.
Interaction
New Features and Improvements
-
The new
ResizeStripeInputMode.AffectedStripeSubregionandResizeStripeInputMode.AffectedItemsproperties provide access to the stripe being modified. -
The new
CanvasControl.PreventViewportInteractionproperty can be used to prevent unwanted interactions with the viewport by touch or pen gestures or the mouse wheel. This replaces the previous enum valueMouseWheelBehaviors.ONLY_WHEN_FOCUSEDwhich applied only to mouse wheel input. -
Added new
MoveViewportInputMode.IsDraggingproperty reflecting the current state of the input mode.
Bug Fixes
- Fixed that tooltips could in rare circumstances appear in a different horizontal location than intended.
-
CanvasControl.PointerLongRestevents no longer fire after initiating a pan gesture with touch input on the canvas. - Interactive edge creation is no longer canceled prematurely by various events such as zooming during the gesture or pressing an unrelated key if bend creation is disabled.
-
Fixed the
ValidatedTextproperty declaration inLabelTextValidatingEventArgsto specify that theValidatedTexttask may returnnull. -
The
GraphControlno longer drifts when theMinimumZoomvalue is reached during pinch zoom. -
WaitInputModedoes not steal pointer capture from other UI elements anymore. -
Fixed delayed zoom and scroll animation of the
GraphControlfor high frequency animation triggers. For example, when strongly accelerating a free-spinning mouse wheel. -
When
HandleInputModecancels the drag gesture, it now callsIDragHandler.CancelDragwith the original handle location instead of the initial pointer location. -
GraphEditorInputModeandGraphViewerInputModenow properly unsubscribe toGraphChangedevents when uninstalled from aGraphControl.
Tooltips and Popovers
New Features and Improvements
-
The new
PopoverManager, in combination with the newPopoverDescriptor, provides an easy way to show popover elements like tooltips, contextual toolbars, detail panels, or persistent annotations. -
The
ToolTipInputModeinternally now uses thePopoverManagerto display tooltips. -
The
QueryItemToolTipEventArgsadditionally provides access to a newPopoverDescriptorthat allows flexible customization of the tooltip's popover element. The new descriptor provides properties for positioning the popover with an additionalUpdateevent that is triggered whenever a significant action occurs while the popover is opened. It also provides access to overwrite the automatic open/close behavior. -
Tooltips now remain open at their initial open location until the cursor exits the item. This behavior can be
adjusted by changing
UpdatePopoverEventArgs.ShowPopoverin theUpdateevent.
GraphML
Bug Fixes
-
MemoryImageNodeStylecould not be serialized correctly when using aBitmapImageasBitmapSource. -
Property values that are derived instances of the property's declared type are now always serialized correctly when
MarkupExtensionsare used. - Fixed parsing empty strings into lists or arrays.
Layout
New Features and Improvements
-
LayoutExecutor.Start,IGraph.ApplyLayout, andGraphControl.ApplyLayoutAnimatednow accept an optionalCancellationTokento cancel the layout calculation or animation. -
When
PortAdjustmentPolicy.ShortenorPortAdjustmentPolicy.Alwaysis set, bends inside the node's geometry are now removed, and the port is moved to the outline. -
The
LayoutGraphnow offers methods to reinsert removedNodeLabelandEdgeLabelobjects. -
The
LayoutGraphHidernow offers methods to temporarily hide and restoreNodeLabelandEdgeLabelobjects.
Bug Fixes
-
LayoutExecutorno longer throws an exception when invoked without an associatedGraphControl. -
The static
LayoutGraphGrouping.IsFlatmethod now correctly identifies graphs that have become flat because the last group node was deleted from the graph. -
LayoutExecutorno longer throws an exception when invoked without an associatedGraphControl.
Hierarchical Layout
New Features and Improvements
-
The
HierarchicalLayoutclass now offers strong support for keeping an existing layout stable with respect to the exact coordinates. This makes it possible to insert incremental new elements while keeping the remaining elements at their original location, or as close as possible to their original location if the original placement is no longer valid.-
Enabling the from-sketch mode (
HierarchicalLayout.FromSketchModeproperty), the results are now more similar to the input, preserving more spatial relations between nodes. -
The new default hint for non-incremental nodes
IncrementalNodeHint.FromSketchpreserves existing spatial relations and straight edges. -
The new hint
IncrementalNodeHint.ExactCoordinatestries to preserve the exact coordinates of nodes if that is possible without creating overlaps or violating other constraints and distance settings. -
The
IncrementalNodeHint.CreateExactCoordinatesHintmethod allows specifying even stronger hints where overlaps and distance violations can be accepted in favor of keeping coordinates fixed. -
The new
HierarchicalLayoutData.IncrementalNodeHintsproperty enables convenient specification of hints for nodes. These hints define how nodes are treated in from-sketch mode.
-
Enabling the from-sketch mode (
-
The
HierarchicalLayoutnow considers sequence and layer constraints between nodes in subcomponents that are layouted with theHierarchicalLayout. -
The
HierarchicalLayoutsymmetry optimization now produces more symmetrical results for grouped inputs. -
Improved the quality of
HierarchicalLayoutresults with sequence constraints. -
The
HierachicalLayoutclass now produces significantly less short edge segments, thus, reducing the number of bends.-
Property
CoordinateAssigner.MaximumPortDeviationallows to control the distance a port may be moved to avoid bends in the connecting edge segment, with the drawback of getting non-uniform port distributions.
-
Property
-
HierarchicalLayoutwithGroupLayeringPolicyRecursiveCompactnow considers the layer coordinates of non-incremental nodes. -
The
HierarchicalLayoutData'sLayerConstraintsandSequenceConstraintsnow offerCreateComponentComparablemethods, to define distinct components, for which the node comparables and item comparables are evaluated independently. -
The enum value
HierarchicalLayoutEdgeType.EdgeGroupRepresentativehas been added, which is used for edges that represent edge groups but are not incident to a source or target group node.
Bug Fixes
-
The
HierarchicalLayoutclass no longer throws an exception when edges have port group IDs at one end and port alignment IDs at the other. -
The
HierarchicalLayoutno longer throws exceptions for rare inputs containing alternate group bounds and edge grouping. -
The
HierarchicalLayoutclass now correctly produces grouped polyline edge routes (RoutingStyle.Polyline) when group nodes exist. Previously, in that case, edges that were grouped were incorrectly routed usingRoutingStyle.Octilinear. -
The
HierarchicalLayoutclass no longer enters an infinite loop when processing certain inputs that involve group nodes and fixed elements. -
The
HierarchicalLayoutclass no longer generates a self-crossing artifact for octilinear edge routes that connect to node sides orthogonal to the layout orientation (e.g. left/right sides for default top-to-bottom orientation). This bug previously occurred only rarely and not for each such port. -
The
HierarchicalLayoutEdgeDescriptor.CreateCopymethod now copies all properties. Previously, it was missingBackLoopRoutingandDirectGroupContentEdgeRouting. -
The
HierarchicalLayoutno longer runs into an infinite loop in very rare cases whenIncrementalNodeHintscreated viaIncrementalNodeHints.CreateExactCoordinateHintwithallowDistanceViolations= true are defined. -
The
HierarchicalLayoutnow correctly considers the specified critical edge priorities for edges withLayoutPortCandidates. Previously, it sometimes ignored these priorities for edges with port candidates at sidePortSides.Any. -
The
HierarchicalLayoutnow works correctly with grouped self-loops. Previously, an error could occur in rare cases. -
The
HierarchicalLayoutNodeContext.Layerproperty now returns -1 if the node is not assigned to a layer. Previously, an error occurred. -
The properties
HierarchicalLayoutNodeContext.AssociatedNodeandHierarchicalLayoutNodeContext.AssociatedEdgenow correctly marked as nullable. -
LayoutGraphSequenceConstraintscreated with the methodsCreateReadonlyVieworCreateWritableCopynow correctly include constraints between edges if there are nodes with constraints as well. Previously, in that case the edge constraints were ignored. -
Sequence constraints and layer constraints defined with the methods of
SequenceConstraintDataandLayerConstraintDataare now only represented once in data structures attached to the graph, which can be accessed, e.g., viaLayoutGraphSequenceConstraints.CreateReadonlyView. Previously, they were inserted twice. This did not affect the resulting layouts. -
The
HierarchicalLayout's integrated edge labeling no longer produces avoidable overlaps between node margins and port labels. -
The
HierarchicalLayoutnow correctly handles grouped input graphs when grid spacing is defined. Previously this could lead to an error if a self-loop edge at a group node existed. -
The
HierarchicalLayoutno longer produces unneeded white space between layers due to overestimating the required first or last segment length of edges.
Bundled Edge Router
New Features and Improvements
-
The
BundledEdgeRouterclass now supports multiple bundling strategies via theBundledEdgeRouter.Strategyproperty. The original approach has been renamed toBundledEdgeRouterStrategy.ForceDirected. Two new strategies are introduced:BundledEdgeRouterStrategy.Spanner, which offers significantly faster performance, andBundledEdgeRouterStrategy.Voronoi, which focuses on high performance while minimizing node-edge intersections.
Organic Layout
New Features and Improvements
-
The
OrganicLayoutwill now assign more uniform z-coordinates to disconnected components whenOrganicLayout.Create3dLayoutis enabled. -
The integrated edge labeling of the
OrganicLayoutnow places the edge labels withEdgeLabelPreferredPlacement.PlacementAlongEdgeset toAtCentercloser to and more symmetric around the midpoint between the borders of the source and target nodes.
Bug Fixes
-
The
OrganicLayoutwith high values for theQualityTimeRatioproperty no longer violates constraints such as forbidden overlaps when running against the specifiedStopDuration.
Circular Layout
Bug Fixes
-
The
CircularLayoutnow correctly considers the specified node margins and labels. Previously, it sometimes produced overlapping margins regions or label overlaps. -
The
CircularLayoutnow correctly considers the minimum radius specified by thePartitionDescriptor.MinimumRadiusproperty.
Other Layouts
New Features and Improvements
-
The performance of the
InteractiveOrganicLayoutclass has been improved for large graphs without group nodes or shape constraints. -
For edge labels with preferred placement center, the
GenericLabelingalgorithm now prefers positions near the center of the path between the incident nodes. The path length inside the incident nodes is ignored.
Bug Fixes
-
The
EdgeRouterclass no longer throws an exception in some cases with bus-style routing (EdgeRouterData.Buses). -
The
OrthogonalLayoutclass now correctly considers the specified bend costs and edge orientation. Previously, for some setups, specifying both could lead to an error. -
The
ChannelRoutingTool.ContainsGroupKeymethod now correctly returns true if the given group ID has been used to register a grouped segment viaAddGroupSegmentmethod. -
The
TreeLayout(viaTreeReductionStage),RadialGroupLayout,RadialTreeLayout, andCircularLayoutno longer produce incorrect (weird-looking) bundled edge curves (seeEdgeBundlingproperty).
Analysis
New Features and Improvements
-
The new
LayoutGraphAlgorithms.GreedySpannermethod allows to calculate the greedy t-spanner for an undirected graph. -
The Neighborhood algorithm now additionally delivers the edges in the neighborhood of the start nodes through the
Neighborhood.Result.Edgesproperty.
Bug Fixes
-
The
LayoutGraphAlgorithms.AllPairsShortestPathmethod publishes the calculated results now. -
The
LayoutGraphAlgorithms.AllUnweightedShortestPathsmethod publishes the calculated results now. -
Fixed an issue when creating a
StructureGraphAdapterfrom a graph.
Documentation and Demos
New Features and Improvements
- The documentation has been improved: A better Readme guides developers through the first steps with the library. The API documentation and Developer's Guide have a clearer styling and better search and navigation functions.
- A new demo browser application enables fast and convenient navigation between various demos.
- Many new demo browser applications demonstrate various features of yFiles WPF and how to use them in code in detail.
- Bends are now easier selectable in the Bezier Edge Style demo.
-
The new demo
GraphMLSupportclass provides convenience methods to import and export GraphML files as well as to register command bindings for the Open, Save andSaveAscommands.
Incompatible Changes
Categories: Bundled Edge Router Controls and Graph File IO General Interaction GraphML Layout Hierarchical Layout
Bundled Edge Router
Incompatible Behavior Changes
-
The
BundledEdgeRouternow usesBundledEdgeRouterStrategy.Spanneras the default strategy for significantly improved performance. To restore the previous behavior, set theBundledEdgeRouter.Strategyproperty toBundledEdgeRouterStrategy.ForceDirected. In addition, for strategyBundledEdgeRouterStrategy.ForceDirected, the range of theEdgeBundling.BundlingStrengthproperty is now better utilized. Previously, most bundling occurred only at very high values.
Controls and Graph
Incompatible API Changes
-
The
EdgeSegmentControl.IsMouseOverEdgeproperty has been renamed toIsPointerOverEdge, and the correspondingOnIsMouseOverEdgeChangedmethod has been renamed toOnIsPointerOverEdgeChangedto reflect the use of pointer events. -
The
GraphControl.GraphMLIOHandlerproperty has been replaced by the extension methodsGetGraphMLIOHandlerandSetGraphMLIOHandler.
Incompatible Behavior Changes
-
To prevent edge tags being overwritten in folding operations,
MergingFoldingEdgeConverter.FoldingDefaultsnow setUpdateMasterOptionstoFoldingSynchronizationOptions.None. -
The default value of the
CanvasControl.MouseWheelBehaviorproperty has been changed toMouseWheelBehaviors.Zoom|MouseWheelBehaviors.Scroll, making both zooming and scrolling available by default. The mouse wheel now zooms by default, and scrolling is triggered when holding the control or shift key. -
The default value of the
CanvasControl.CenterZoomEventRecognizerproperty has been changed fromEventRecognizers.CtrlIsDowntoEventRecognizers.AltIsDown. -
The
GraphControl.FitGraphBoundsmethod no longer adds an undocumented additional margin of 1 when no margins are specified as arguments.
File IO
Incompatible API Changes
-
The convenience methods
ExportToGraphMLandImportFromGraphMLas well as theGraphMLIOHandlerproperty have been removed fromGraphControl. Applications should hold their ownGraphMLIOHandlerinstance instead and use its Read and Write methods or use the newGraphMLSupportclass provided as source code. -
The
GraphControl.FileOperationsEnabledproperty has been removed as the Open, Save andSaveAscommands are not handled by theGraphControlanymore. Applications should implement their own bindings for those commands or use the newGraphMLSupportclass whoseRegisterOpenSaveCommandBindingsmethod registers default open/save behavior.
Incompatible Behavior Changes
-
The
GraphControldoesn't handle the Open, Save, andSaveAscommands anymore. Applications should implement their own bindings for those commands or use the newGraphMLSupportclass whoseRegisterOpenSaveCommandBindingsmethod registers default open/save behavior.
General
Incompatible API Changes
-
The unused protected constructors of
SerializationNotSupportedExceptionandDeserializationNotSupportedExceptionhave been removed since they were based on an obsolete constructor of the base class.
Interaction
Incompatible API Changes
-
Renamed
ToolTipInputMode.ShowtoToolTipInputMode.Open. -
Removed
ToolTipInputMode.OnShowmethod. It is now part ofToolTipInputMode.Open. -
Removed
ToolTipInputMode.OnHidemethod. Instead use the newClosedevent onPopoverDescriptor. -
Removed
ToolTipInputMode.Hidemethod. Instead use theToolTipInputMode.Closemethod orPopoverDescriptor.Close. -
Renamed
ToolTipInputMode.ShowingtoToolTipInputMode.IsOpenand made it readonly now. -
Removed
ToolTipInputMode.GetToolTipLocationmethod. -
Removed
ToolTipInputMode.GetToolTipContentmethod. -
Moved and renamed
ToolTipInputMode.ToolTipproperty toPopoverDescriptor.Content. -
The enum value
MouseWheelBehaviors.ONLY_WHEN_FOCUSEDhas been removed in favor of the newCanvasControl.PreventViewportInteractionproperty. Set it to the valuePreventViewportInteractionPolicy.UNFOCUSEDto achieve the old behavior with the additional improvement that it now not only prevents mouse wheel interactions but also touch and pen viewport gestures.
GraphML
Incompatible API Changes
-
The Owner property has been removed from
GraphMLParseValueSerializerContextandGraphMLWriteValueSerializerContextas they were not used anymore.
Layout
Incompatible API Changes
-
Support Interval class has been moved from the
yWorks.Layout.Routernamespace to theyWorks.Geometrynamespace. -
The
EdgeLabelCandidates.AddDiscreteCandidatesmethod usesDiscreteEdgeLabelPositionsenum to specify label positions. The value Centered was removed from this enum; use the existing value Center instead.
Hierarchical Layout
Incompatible API Changes
-
Removed the
CoordinateAssigner.BendReductionproperty. The number of bends is always optimized. -
Removed the
CoordinateAssigner.StraightenEdgesproperty. The replacement is the newCoordinateAssigner.MaximumPortDeviationproperty. To get the old behavior for "true" use a large value on the new property, for "false", use zero. -
The
IncrementalNodeHintmember is now a class and no longer an Enum. The available hint values have been changed as follows:-
LayerIncrementallyhas been replaced byIncremental. -
SequenceIncrementallyhas been replaced byIncrementalWithLayersFromSketch. -
Nonehas been replaced byKeepRelativeOrder. It is no longer the default value for nodes without a hint.
-
-
The
IncrementalEdgeHintvalues have been changed as follows:-
Nonehas been replaced byKeepRelativeOrder. -
SequenceIncrementallyhas been replaced byIncremental.
-
-
Removed the
CoordinateAssigner.ExactPlacementproperty. To keep coordinates as fix as possible, use hintIncrementalNodeHint.ExactCoordinatesor a hint created with theIncrementalNodeHint.CreateExactCoordinatesHintmethod. The old behavior forcing exact placement on the existing coordinate while even accepting severe violations of other constraints or illegal group overlaps is no longer available. -
Removed the
CoordinateAssigner.FromSketchLayerAssignmentproperty. If there are nodes with exact-coordinate hints, their layer coordinates in the sketch are now always considered. Otherwise, the property had no effect, and the behavior has not changed.
Incompatible Behavior Changes
-
The default behavior when enabling the
HierarchicalLayout.FromSketchModeproperty has been changed. Now, the given sketch (current coordinates) has a higher impact. Results are often closer to the sketch than previously. To get the old behavior where only the relative order of elements was preserved, specify hintIncrementalNodeHint.KeepRelativeOrdervia layout dataHierarchicalLayoutData.IncrementalNodeHintsproperty.