Release notesyFiles.NET (WinForms)
yFiles.NET (WinForms) 5.6
Version 5.6 is the latest yFiles.NET (WinForms) major release.
See the change log for a list of all changes in this and all other versions.
Below you will find the technical requirements and a list of all changes, including new features and incompatible changes.
What to expect on this page
Technical Requirements
- Applications based on yFiles.NET Complete or yFiles.NET Viewer require the Microsoft .NET Framework 4.0 (or higher). Applications based on yFiles.NET Layout require the Microsoft .NET Framework 3.5 (or higher) or a .NET implementation that supports .NET Standard 2.0 (e.g. .NET Core 2.0).
- A browser to view the HTML documentation.
- A Microsoft Windows operating system that supports one of the aforementioned .NET versions.
All changes Since version 5.5.0.1
This release brings exciting new major features, and many other minor new features, improvements, and bugfixes to all parts of the library.
If you are updating from an older version of yFiles.NET, have a look at the list of incompatible changes.
Major new features
- Constraint organic layout and more
-
The
OrganicLayout
class now supports different types of constraints that restrict the placement of the graph's nodes that are specified with the newOrganicLayoutData.Constraints
property.In addition, organic layout now supports:
-
Integrated edge labeling, which can be enabled with the
OrganicLayout.IntegratedEdgeLabeling
property -
Drawing edges such that they point to the main layout direction, specified with the new
OrganicLayoutData.EdgeOrientations
property -
Individual minimum lengths of edges that can be specified with the new
OrganicLayoutData.MinimumEdgeLengths
property.
-
Integrated edge labeling, which can be enabled with the
- Compact tabular layout
-
The
TabularLayout
class now supports the calculation of node arrangements that lead to a low overall edge length. This feature can be enabled with the new propertyconsiderEdges
. - New alignment layout stage
-
The new
AlignmentStage
class places the nodes of a given layout on automatically determined horizontal and/or vertical lines. This stage is particularly designed as a post-processing step that snaps suitable nodes to the same x- or y-coordinates to obtain a grid-like structure. When rearranging the initial layout, the stage moves the nodes as little as possible.The associated new
AlignmentStageData
class allows specifying custom data considered during the layout calculation. - Improved group node style
-
The last major release brought a powerful
GroupNodeStyle
, that got even more features and improvements in this release, namely:-
If
GroupNodeStyle
's tab width is set to 0, the tab width does not reduce the corner radius of the style's outline anymore. However, it still forces the corner radius of the style's inner corners (i.e., the corners of the content area on the side of the style's tab) to 0. -
The new
GroupNodeStyle.MinimumContentAreaSize
property simplifies enforcing a minimum size for the content area a group node. -
GroupNodeStyle
offers the possibility to have its tab width grow (or shrink) depending on the preferred size of associated tab and tab background labels. -
The new
GroupNodeStyle.RenderTransparentContentArea
property controls whether a semi-transparent value for thecontentAreaFill
property works as expected by showing what's behind the group node.
-
If
- Support for .NET 8.0
-
To facilitate using our library with .NET 8.0 and to improve compatibility a .NET 8.0 version of the library has been added.
New Features
Styles
-
Selection, focus, and highlight visualizations can now be easier customized with a node, edge,
label, or port style. These style instances can be set to the corresponding properties of the new
GraphSelectionIndicatorManager
,GraphFocusIndicatorManager
, andGraphHighlightIndicatorManager
classes that can be set as corresponding managers on theGraphControl
. This removes the need forNodeStyleDecorationInstaller
, etc. -
To render items in a zoom-invariant fashion, their style can be wrapped in one of the new
IndicatorNodeStyleDecorator
,IndicatorEdgeStyleDecorator
,IndicatorLabelStyleDecorator
, orIndicatorPortStyleDecorator
classes. The main use case for these decorators is using item styles as selection, focus or highlight indicators.
Layout
-
The
OrganicLayout
class now provides a feature that dynamically detects whether nodes already lie almost on a common line or circle and, if so, snaps the nodes to this line/circle. This new feature can be enabled with theChainRecognition
andCircleRecognition
properties. -
PreferredPlacementDescriptor
instances can now be created fromILabelModel
andILabelModelParameter
instances, respectively, via theirToDescriptor
extension method. -
The
RadialLayout
class now allows defining a custom order of child nodes around a local root node. The order can be individually specified for each node by using the newRadialLayoutData.OutEdgeComparers
property. It is especially suitable for tree-like input graphs. For specifying a single global order for all nodes, for example, alphabetically, the newRadialLayoutData.NodeComparables
property is a more convenient option. -
The
CircularLayout
class now offers the possibility to define star substructures. TheCircularLayout.StarSubstructureStyle
property specifies the style of star substructures and theCircularLayout.StarSubstructureSize
property their minimum size (structures of smaller size are not handled as a star substructure). Furthermore, theCircularLayout.StarSubstructureTypeSeparation
property specifies whether star substructures should be separated by the node type. -
The
CircularLayoutData
class offers the newEdgeDirectedness
property that influences the detection of star-substructures; seeCircularLayout.StarSubstructureStyle
.
Improvements
Graph
-
EdgePathLabelModel
andEdgeSegmentLabelModel
have been improved to provide better placements with edge-cases where the path is too short for the label or degenerates completely. -
GroupNodeLabelModel
no longer triggers anArgumentException
when used with / set for a node that does not useGroupNodeStyle
.GroupNodeLabelModel
is still not intended to be used with nodes that do not useGroupNodeStyle
. This restriction has been lifted to support workflows where the node style is set toGroupNodeStyle
after the label model is set toGroupNodeLabelModel
. - Changing the height of an arc or bridge edge via its handle is now undoable.
View
-
The rendering order of nodes in the
GraphOverviewControl
has been improved to be more in sync with the rendering order in the correspondingGraphControl
. -
GraphOverviewControl
now uses itsContentGroup
instead of theRootGroup
to add the visualization of its graph content. This makes it easier to customize the overview for example by adding a background visual. -
The
LabelLayerPolicy
property ofGraphModelManager
, which defines whether labels should be rendered at their owner or in a separate layer, has been split into three separate propertiesNodeLabelLayerpolicy
,EdgeLabelLayerPolicy
, andPortLabelLayerPolicy
to support different policies for node, edge, and port labels. -
The new
SelectionModelChanged
event ofGraphControl
is raised when the model managing the selection is changed itself, not when the selected items change.
Styles
-
The
ArrowEdgeStyle
's bounds now are tightly enclosing the rendered shape. Before they were too large. -
Bends in edges that use
ArcEdgeStyle
,ArrowEdgeStyle
, orBridgeEdgeStyle
are no longer shown when selecting these edges. Additionally, marquee selection will not select these bends anymore even if they lie in the selection rectangle.
Interaction
-
The method
PortRelocationHandle.CreateDummyEdge
is now virtual and can be overridden. -
The protected property
DummySourceNodePort
has been added toCreateEdgeInputMode
to simplify overridingCreateDummyEdge
. -
The protected virtual method
CreateEdgeInputMode.CreateDummyBend
has been added that can be overridden to customize bends added during edge creation. -
The edge creation start gesture while dragging inside the source node can now be customized with
CreateEdgeInputMode.SourceNodeDraggingFinishedRecognizer
. -
The
ItemDroppedInputMode.DragDropped
event is now raised after the drop gesture has actually finished, in line with how similar events are raised elsewhere. -
The
MoveInputMode
,MoveLabelInputMode
, andHandleInputMode
sub-modes ofGraphEditorInputMode
no longer have a pre-setSnapContext
. Instead, they get theirSnapContext
from theInputModeContext
. That way, setting theSnapContext
onGraphEditorInputMode
will affect all sub-modes unless a customSnapContext
is set to them. - The resize handle rendering order has been adapted to improve usability for small nodes.
GraphBuilder
-
The
GetUpdatedStyle
method of theNodeCreator
/EdgeCreator
/LabelCreator
classes now uses the default style from the graph as fallback if the style provider is not set. -
The
LabelCreator.GetUpdatedLayoutParameter
method now uses the default layout parameter from the graph as fallback if the layout parameter provider is not set. -
The
NodeCreator
,EdgeCreator
, andLabelCreator
classes can now be used without aGraphBuilder
. This enables developers to apply styles and labels from a data object in cases where aGraphBuilder
is not suitable for graph creation. -
A
NodeSource
now allows for recursive definition of child nodes in a grouping hierarchy. The new methodsAddChildNodesSource
andCreateChildNodesSource
allow for defining a source to fetch child node items from a node data item. -
A
NodeSource
now allows for implicit definition of parent nodes in a grouping hierarchy. The new methodsAddParentNodesSource
andCreateParentNodesSource
allow for defining a source to fetch a parent node item from a node data item.
GraphML
-
Improved GraphML serialization of
Color.Transparent
.
Layout
-
If
AffectedLabels
are set inLabelingData
but noDpKey
has been provided for them, the key set asAffectedLabelsDpKey
on the labeling algorithm will be used. - For oriented rectangles the intersection test no longer allocates unnecessary memory and no longer creates unnecessary objects, which improves its allocation performance.
-
The
HierarchicLayout
class now also considers layering constraints between elements of different grouping hierarchies if the recursive group layering is enabled (propertyHierarchicLayout.RecursiveGroupLayering
). Previously, such constraints were ignored in that case. -
The
TreeLayout
class now places the ports of edges incident to multi-parent nodes and with port constraints (excluding any-side constraints) at the nodes' border. Previously, unlike as for edges incident to other nodes, the edge ports where located at the nodes' center. -
The
RadialLayout
class now supports node types. The types influence the ordering of nodes of the same circle such that nodes of the same type are preferably placed next to each other if this does not induce additional crossings or conflicts with other constraints. Node types can be defined via theRadialLayoutData.NodeTypes
property.
Bugfixes
Graph
-
Fixed
NullReferenceException
that occured when removing highlighted edges from their graph. - Fixed a bug where labels with an initial opening brace were not correctly serialized.
-
NinePositionsEdgeLabelModel
center placements above and below the edge have been improved when the angle wasn't close to one of the two coordinate axes and the distance was non-zero. Previously, labels could seem to jump around when the path changed and weren't always close to the center of the path. -
GroupNodeLabelModel
no longer stretches tab labels and tab background labels into the collapse/expand icon of the correspondingGroupNodeStyle
. -
NavigationInputMode.ExpandGroup
,EnterGroup
, and theExpandGroup
andEnterGroup
commands do not create empty undo units anymore if nothing has changed. -
NavigationInputMode.ExitGroup
and theExitGroup
command now create undo units if the bounds of the exited group node were adjusted. -
GroupingSupport
's methodsEnlargeGroupNode
andEnlargeAllGroupNodes
do not create empty undo units anymore if nothing has changed.
View
-
CanvasControl
: Animated viewport changes could lead to strange behavior if maximum or minimum zoom were set and violated by the viewport change. -
GroupNodeStyle
's associatedINodeInsetsProvider
now correctly calculates insets for "small" nodes, i.e. nodes whose height (or width) is less than the style'sTabHeight
property. - Fixed a bug which might have caused port selection visualizations to disappear in image export or printing under rare conditions.
Styles
-
With
ArcEdgeStyle
, the 3 center positions of theNinePositionEdgeLabelModel
are now in the right places. Previously they were often way off. -
GroupNodeStyle
's collapse/expand icon can now be reliably hit in all cases. In rare cases, changing the value of one the properties that affect the icon's location were not taken into account for hit tests. -
GroupNodeStyle
no longer renders a hairline in place of the tab when using aPen
withTabWidth
0. -
ImageNodeStyleRenderer
'sGetBounds
method now returns the actual image bounds instead of the node layout's bounds ifKeepAspectRatio
is enabled. -
DefaultLabelStyle
now adds ellipsis more reliably at the end when the text does not fit into the specified text wrapping shape. - Bezier edges no longer devolve into polyline paths under rare circumstances.
-
ArrowEdgeStyle
now correctly considers its visibility with thicknesses greater than 13. -
MemoryImageNodeStyle
andUriImageNodeStyle
now properly respect theirKeepAspectRatio
property for rendering, hit testing, and outline. -
The hit test for
PolylineEdgeStyle
,ArcEdgeStyle
,BezierEdgeStyle
, andBridgeEdgeStyle
has been fixed. Previously, the hit area was too large when using thicker pens.
Interaction
- The default visualization for selected ports is now displayed properly.
-
Fixed an issue where changing the
GraphControl.InputMode
while the context menu is open would lead to a crash. -
Fixed a bug in
HighlightIndicatorManager
that could result in missing or surplus highlight visualizations when changing theGraphControl.HighlightIndicatorManager
. - Self-loops no longer disappear when resizing nodes while orthogonal editing is enabled.
-
Fixed a bug in
MoveViewportInputMode
that caused the inertia feature to mistakenly start moving the viewport after the mouse pointer has stopped before being released. -
Starting a
CanvasControl
/GraphControl
viewport animation now properly stops a runningMoveViewportInputMode
inertia animation. - The direction of the first edge segment during orthogonal edge creation is now correctly determined when the source port candidate lies on the node border.
- Fixed a bug in some input modes which led to undefined behavior if the mode has been uninstalled in a handler for its own events.
GraphML
-
Fixed GraphML serialization and deserialization for certain configurations of
GroupNodeStyle
andRectangleNodeStyle
.
Animations
- Layout animation performance has been improved for edges with many bends.
Analysis
-
Fixed the issue of excessive memory consumption in the analysis algorithm
Paths
when a large number of start and end nodes were set. -
The
ShortestPaths
class now correctly calculates the k-shortest paths of graphs (see methodsShortestPaths.KShortestPaths
andShortestPaths.KShortestPathsCursor
). Previously, in rare cases, the algorithm sometimes produces wrong results, i.e., returns paths that are not the shortest.
Layout
Hierarchic Layout
-
Rare combinations of
PortCandidates
inPortCandidateSets
no longer result in exceptions. -
For input graphs with a
PartitionGrid
structure, theHierarchicLayout
class now correctly considers the layering produced by theFromScratchLayerer
if it is already compatible with the specified grid structure.
Organic Layout
-
The
OrganicLayout
class no longer produces edge overlaps when propertyChainRecognition
is enabled. - In rare cases fixed nodes could move when also a group node was fixed.
Radial Layout
-
The
RadialLayout
class no longer throws an exception if the layout algorithm is executed too many times from the same instance.
Circular Layout
-
The
CircularLayout
class no longer throws an exception if propertyStarSubstructureStyle
is set toStarSubstructureStyle.Radial
and the whole input graph is a star.
Clear Area Layout
-
The
ClearAreaLayout
class no longer produces results where the specified area is not cleared for some input graphs when propertyClearAreaStrategy
is set toPreserveShapes
orPreserveShapesUniform
.
Partial Layout
-
The
PartialLayout
class does no longer yield different results in rare cases when the same instance is applied twice to the same input graph. -
The
PartialLayout
class now correctly places disconnected components for cases where a layout orientation is specified, and the propertyComponentAssignmentStrategy
is not Single. Previously, such components were sometimes placed far away from the remaining graph elements.
Edge Router
-
The
EdgeRouter
class does no longer yield different results in rare cases when the same instance is applied twice to the same input graph. -
The
EdgeRouter
class no longer produces self-crossing routes of edges with labels if propertyIntegratedEdgeLabeling
is enabled. -
The
EdgeRouter
class no longer produces bad layout results for some scenarios with grouped edges and multiplePortCandidates
. Previously, the algorithm selected any of them without considering the alternative options.
Orthogonal Layout
-
The
OrthogonalLayout
class no longer throws an exception for some input graphs with tree substructures when theTreeStyle
is set to a value different fromTreeLayoutStyle.None
.
Demo Improvements
-
Fixed
BPMN
-DI
import forLaneSets
in a Subprocess.
Incompatible Changes
Requirements
- yFiles does not support .NET Core 3.1 anymore. Minimum .NET version is 6.0 now. Minimum .NET Framework version still is 4.0. For the Layout only packages, the minimum requirements still are .NET Framework 3.5 and .NET Standard 2.0
- The Layout package, i.e. the package which provides only the layout and analysis library, now only provides libraries for .NET Framework 3.5 and .NET Standard 2.0. These are compatible with all supported .NET versions, though.
API
-
The property
GraphModelManager.LabelLayerPolicy
has been marked as deprecated and may be removed in future releases. Use the more specific propertiesNodeLabelLayerPolicy
,EdgeLabelLayerPolicy
, andPortLabelLayerPolicy
instead. -
HoveredItemChangedEventArgs
is no longer a subclass of the unrelatedItemEventArgs
. -
TreeNodeSource
andAdjacencyNodesSource
no longer inherit fromNodeSource
. -
TreeBuilder.SetData
only accepts aTreeNodesSource
and no longer aNodesSource
as a parameter.
Layout
-
CactusGroupLayout.DefaultNodeComparator
has been renamed toDefaultNodeComparer
.
Interaction
-
The
ItemDroppedInputMode.DragDropped
event is now raised after the drop gesture has actually finished, in line with how similar events are raised elsewhere. -
Bends in edges that use
ArcEdgeStyle
,ArrowEdgeStyle
, orBridgeEdgeStyle
are no longer shown when selecting these edges. Additionally, marquee selection will not select these bends anymore even if they lie in the selection rectangle. -
The
MoveInputMode
,MoveLabelInputMode
, andHandleInputMode
sub-modes ofGraphEditorInputMode
no longer have a pre-setSnapContext
. Instead, they take theSnapContext
from theInputModeContext
. That way, changing theSnapContext
onGraphEditorInputMode
will also affect the sub-modes.
Changes of Default Behavior
-
EdgePathLabelModel
andEdgeSegmentLabelModel
have been modified to yield better results for some degenerate path cases. This leads to greater visual stability when the path is not long enough for the label or even completely invisible due to overlapping nodes. Technically, this can result in slightly different placements with the same parameter values in these edge-cases. -
Adding a label with
GroupNodeLabelModel
to a node that does not useGroupNodeStyle
or setting aGroupNodeLabelModel
-created parameter for a label whose owner node does not useGroupNodeStyle
no longer throws anArgumentException
claiming "The parameter does not support this kind of label.". -
If
GroupNodeStyle
's tab width is set to 0, the tab width does not reduce the corner radius of the style's outline anymore. However, it still forces the corner radius of the style's inner corners (i.e. the corners of the content area on the side of the style's tab) to 0.
Layout
-
The
EdgeRouter
class now ignores inner node labels by default, see propertyIgnoreInnerNodeLabels
. Previously, this property was disabled by default.