yFiles WPFChangelog
yFiles WPF 2.5.0.4 - Changes Since 2.5.0.3
Bugfixes
Viewer
-
The
CreateEdgeInputMode.EdgeCreatedevent has been raised before the corresponding undoable edit was committed. This could result in a broken undo queue, if e.g. an animated layout was started during in the event listener. The event is now raised after the edit has been committed. With automatic undo unit merging, this should not make a difference for the end user, however from the perspective of the code there will be two subsequent edits, rather than one compound, if the code in the listener actually modifies the edge. - Fixed a bug that occurs if two nodes are touch-dragged into the graph at the same time.
-
SmartEdgeLabelModel: Edge label snap lines have been too short for some positions that are far apart from the edge path. -
SmartEdgeLabelModel: An exception was thrown if the path of the corresponding edge contained bends that were close together or at the same location. - Folding: The view state of a port on a folder node was sometimes ignored when a folding edge was created.
- Fixed a bug that prevented individually disabling certain grouping commands.
- When dragging an unselected bend and canceling the gesture by pressing ESC, the dragged bend was removed.
-
Fixed several issues with orthogonal edge editing.
- Canceling moving a port added bends to otherwise straight edge segments.
- An edge could have become non-orthogonal when a non-selected bend was moved.
- Self-loops with the same source and target location are now treated as orthogonal.
- When serializing BitmapImages that were created from a relative URI without also specifying a BaseURI, a NRE was thrown.
-
Explicit
Arrowelements in GraphML were sometimes read back incorrectly. The new deserialization propertySerializationProperties.ParseArrowElementAsDefaultArrowcan be used to work around this issue. - GenericPortLocationModel wasn't serialized correctly.
-
Table.SetStyle(ILabel, ILabelStyle)andTable.SetLabelModelParameterignored the provided style resp. label model parameter. -
PathBasedEdgeStyleRenderercould leave visual artifacts when switching to an arrow that returned a null visual. -
OverviewInputModecould break the overview visualization if the overview had a very small width or height. -
OverviewInputModethrew an exception if it was used without aClientCanvas. -
KeyboardInputMode now passes the original
CompoundKeyEventArgsto registered event handlers instead ofEmptyArgs. - Touch move events have an effect only if the corresponding touch down event also happened within the GraphControl.
-
The
IsDownproperty of aTouch2DDevicewas alwaysfalseafter the first touch up event of that device, e.g. after the first tap of a double tap. - Fixed an issue where under rare circumstances an exception could be thrown via UI Automation when the GraphControl was not part of a window.
- Hiding INodeSnapResultProvider or IBendSnapResultProvider from the lookup no longer leads to a crash when nodes or bends are moved.
-
StripeDropInputMode.StripeCreatedalways returned a wrong stripe instance. - Fixed a possible NullReferenceException in PaintSupport when items were removed from the graph during their style's UpdateVisual method. This could happen when removing graph items from a different thread.
Layout
-
Fixed a bug in
TableLayoutConfiguratorwhich altered the size of a column or row if an edge routing algorithm has been applied.
Demos
- BPMN demo: Default ConversationNodeStyle could not be deserialized correctly.
yFiles WPF 2.5.0.3 - Changes Since 2.5.0.2
Bugfixes
- A bug in
RotatedSliderEdgeLabelModelthat could only occur in very rare occasions where the first or last edge segment is orthogonal and the source or target port was completely outside the node boundaries, could cause the label to lie at infinite coordinates. In most cases this would result in the label becoming just invisible, but code that does not properly handle infinite coordinates could possibly break due to numeric instabilities. - An edge whose source or target port is owned by another edge (edge-to-edge connection) was always drawn in the background if grouping was enabled instead of in front of the related groups. Now, such an edge is drawn in front of these groups, with the same z-index as a similar edge from node to node would get.
- Nodes can now be reparented with a touch gesture, by touch-dragging a node onto its new parent. Previously, that was only possible with a mouse drag.
GenericYList: CallingInserton an empty list has thrown an exception.MoveViewportInputModeno longer fires theDragFinishingandDragFinishedevents for simple clicks without any mouse movement.NodeDefaults,EdgeDefaultsand all otherDefaults: it was erroneously possible to assignnullto theStyleproperty although this property is marked asNotNull. Now, the property throws anArgumentNullExceptionin this case.FoldedGraphdetects more carefully what has changed before invoking the methodsCreateDummyEdgeAppearanceandChangeDummyEdgeAppearanceofIDummyEdgeConverter. Previously, in some cases, these methods were called to often or not at all.- When both a group node and its child node were resized together the group node bounds shrunk to its original bounds once the child had reached the original bounds.
- Fixed problem in
LayoutGraphAdapterwhere label candidates for edge labels were not always determined correctly. - When snapping was disabled temporarily (using Ctrl) during a move gesture the moved item snapped after finishing the gesture, anyway.
FoldedGraphUndoSupportdidn't add the correct bend information to its internal data structures.DefaultArrow.Lengthdid not take theScalefactor into account, sometimes leading to gaps between the edge and the arrow.- Custom selection visualizations using
EdgeStyleDecorationInstallerwere not animated correctly. - Custom selection visualizations using
EdgeStyleDecorationInstallerinDecorationZoomMode.MixedorDecorationZoomMode.ViewCoordinatesdid not work correctly together withBridgeManager. - Explicit null values (
<x:Null/>) in GraphML could lead toNullReferenceExceptions. - GraphML serialization can be forced to write a class property in element syntax using a
GraphMLAttribute'sWriteAsAttributeproperty with valueXamlAttributeWriteMode.Never. Forcing a property that is shared to be written as element lead to invalid GraphML files. - If
GraphEditorInputMode.Graphhad been changed, the mode still held a reference to items from the previous graph instance, thus delaying garbage collection of that graph instance. This has been improved. - Orthogonal edge editing could throw an exception if edges were removed during a gesture that would require edge orthogonalization.
- Event location of the various
TapInputModeevents was not always updated properly. - Improved performance of
BridgeManagerand prevented redundantLineTopath elements. XpsExporter: Fix possible exception caused by insufficent file permissions and prevent locked files caused by internal exceptions.- Changes to
IGraph.Nodes,IGraph.Edgesand other collection properties onAbstractGraphWrapperimplementations were not correctly propagated to the wrappedIGraphinstance. In particular, this affected folding views. - If
NodeDropInputMode.LeafParentsAllowedwas false, dropping a node onto a leaf node did not consider parent group nodes of the leaf node as possible drag targets. This was a regression with respect to the behavior in version 2.4 and earlier of the library. The fixed behavior is slightly incompatible with previous releases in the 2.5 release branch. - If
NodeDropInputMode.LeafParentsAllowedwas true, the value of theFolderNodeParentsAllowedwas ignored.
Layout
IncrementalHierarchicLayouter: In non-incremental mode, sequence constraints may not have been respected.IncrementalHierarchicLayouter: Optimized the sequence of group nodes if 'place at head/tail' sequence constraints are defined.IncrementalHierarchicLayouter: corrected wrong node placements in graphs with groups if sequence constraints are used.Polyline.EdgeRouter: Fixed rareNullReferenceExceptionthat may occur for graphs where only a subset of edges is routed, seeEdgeRouter.SphereOfAction.CircularLayouter: Fixed bug that may cause node overlaps.CopiedLayoutGraph: Fixed problem that may cause movement of label boxes in the original graph even if methodCopiedLayoutGraph.CommitLayoutToOriginalGraphis not called.ComponentLayouterModule: Disabled from-sketch option for styles that don't support it.MultiPageLayouter: Fixed bug that caused that anAbortHandlerattached to the input graph was ignored.MultiPageLayouter: FixedNullReferenceExceptionthat may occur if the data providerMultiPageLayouter.EdgeIdDpKEyis an instance ofEdgeMap.IncrementalHierarchicLayouter: Fixed routing style violations in octilinear grouped edges.IncrementalHierarchicLayouter: Fixed label placement for octilinear selfloops with the same side constraints for source and target port.
Incompatible Changes
Changes in Default Behavior
- If
NodeDropInputMode.LeafParentsAllowedis false, dropping a node onto a leaf node now does consider parent group nodes of the leaf node as possible drag targets. This fixes a regression with respect to the behavior in version 2.4 and earlier of the library. The fixed behavior is slightly incompatible with previous releases in the 2.5 release branch.
yFiles WPF 2.5.0.2 - Changes Since 2.5.0.1
Bugfixes
Viewer
TableEditorInputModeby default also handled right clicks, which prevented the context menu for stripes from appearing and erroneously toggled the stripe selection state.GraphClipboard: nodes pasted at given locations (ParentNodeDetectionMode.AtLocation) were erroneously pasted as child nodes of leaf nodes but not group nodes.GraphClipboard: if a node has been moved after being copied it might have been erroneously pasted into its original parent node even though the parent node has been moved away, too.GraphClipboard: fixed possible crash when copying nodes and edges withGraphClipboard.IndependentCopyItemsset toGraphItemTypes.None.GraphViewerInputMode: mouse clicks did not change the current item if the theSelectableItemsproperty did not allow to select the item. This was a behavioral change compared to version 2.4 and earlier and has been reverted.GraphClipboard: bends on edges at collapsed group nodes were moved by twice the value than the edge's source and target nodes.- Creating a new node as a child of an existing node which was not a group node did not cause the state change to be recorded by the undo engine. After undoing the node creation, the parent node still behaved like a group node. Such an implicit change is now recorded properly and can be reverted through undo as expected.
GraphExtensions.Reverse(): Edge reversal on a folded graph could result in an exception.GraphExtensions.Reverse(): Edge reversal on a folded graph resulted in a loss of all view states of the edge.- Custom
IHitTestEnumerator<INode>implementations were ignored whenGraphCLipboard.ParentNodeDetectionwas set toParentNodeDetectionMode.AtLocation.
Layout
IncrementalHierarchicLayouter: FixedNullReferenceExceptionthat could occur when octilinear edges are attached to group nodes.HVTreeLayouter: Fixed bug that may cause edges with reversed direction if the layout isn't run in buffered mode.PortCandidateSet: Fixed bug that caused methodPortCandidateSet.CandidateMatcher#FindMatchingCandidate()to return the entry with the highest cost instead of the lowest cost if the candidate matcher is created with methodPortCandidateSet#CreateMatcher().DirectedOrthogonalLayouter: Fixed bug that caused anArgumentExceptionif DataProvider-KeyPortConstraintKeys#SourceGroupIdDpKeyis registered to the input graph but DataProvider-KeyPortConstraintKeys#TargetGroupIdDpKeyis not registered.ComponentLayouter: Fixed bug that caused anIndexOutOfRangeExceptionif the style is set toComponentArrangementStyle#MultiRowsHeightConstrainedorComponentArrangementStyle#MultiRowsHeightConstrainedCompact(seeComponentLayouter#Style) and all components exceed the preferred height (seeComponentLayouter#PreferredLayoutSize).IncrementalHierarchicLayouter: Fixed bug that caused first or last segments of edges to be too short to span all associated labels.MultiPageLayouter: Fixed bug that may cause non-orthogonal edge routes.TreeReductionStage: Fixed bug that may cause aWrongGraphStructure-Exception if the input graph contains group nodes with incident edges.TreeLayouter: Fixed bug that may cause aInvalidCastExceptionif the input graph is aCopiedLayoutGraphthat consists of multiple connected components and the layouter uses theLayeredNodePlacer(e.g., if optionTreeLayouter#ChildPlacementPolicyis set toChildPlacementPolicy#AllLeavesOnSameLayer).
Improvements
Viewer
- Improved options for internationalization of strings used in the library. Now custom resources with the names
yWorks.Canvas.CanvasResourcesandyWorks.yFiles.GraphResourcescan be added to the application project and override strings the library uses.
Layout
- It is now possible to use
IEnumerableandIEnumerable<T>implementations for collections of port candidates.
Changes in Default Behavior
TableEditorInputModenow only handles left mouse clicks by default, which is consistent with the rest of the library.
yFiles WPF 2.5.0.1 - Changes Since 2.5
Bugfixes
Viewer
- Fixed NullReferenceException in the visibility check of class
EdgeSelectionRendererthat could occur whenEdgeSelectionRenderer.Penwas null. - Fixed too large dirty regions when using certain kinds of
SnapLines. - Properties
ShinyPlateNodeStyleRenderer.Radius,ShinyPlateNodeStyleRenderer.Brush,ShinyPlateNodeStyleRenderer.PenandBevelNodeStyleRenderer.Radiuswere not used consistently. - Fixed memory leak that occurred when
CreateEdgeInputModewas uninstalled.
Layout
IncrementalHierarchicLayouterandRankAssignments: Fixed possibleNullReferenceExceptionthat may occur if the maximal duration of the algorithm is limited.IncrementalHierarchicLayouter: Fixed bug that may cause overlaps of edge labels with preferred placement at source/target.Polyline.EdgeRouter: Fixed rareNullReferenceExceptionthat mainly appears if there are overlapping nodes.PartialLayouter: Fixed bug that may cause broken edge routes for edges incident to incremental group nodes if optionRouteInterEdgesImmediatelyis enabled.CompactOrthogonalLayouter: Fixed possibleArgumentExceptioncaused by nodes without node-ids. This problem may only appear if the inter edge router is set toChannelInterEdgeRouter.
yFiles WPF 2.5 - Changes Since 2.4.0.6
Major Features Added
Viewer
GraphClipboardnow supports copying independent items. This allows the user to copy labels, ports, bends, or edges to other elements without having to copy their owners. Also this technique allows for copying an item (for example a label) to multiple target elements at once.- The
GraphClipboardnow supports an optional target location for pasting and the new methodGraphEditorInputMode.PasteAtLocationcan be used for this end, too. In addition,ApplicationCommands.Pastenow supports an optional parameter of typeIPointto provide a target location. GraphEditorInputModenow provides default action for duplicating single graph items or whole subgraphs. This also works with incomplete subgraphs, for example in a tree, it is possible to duplicate a subtree and the tree will never be disconnected.
In addition, the new commandGraphCommands.DuplicateSelectionCommand(shortcut: Ctrl-D) and the new methodGraphClipboard.Duplicatecan be used to duplicate selected items without altering the clipboard contents.GraphEditorInputModenow provides a default action for reversing edges. To this end, the methodsReverseEdgeandReverseEdgeshave been added toGraphEditorInputMode. Also, the new commandGraphCommands.ReverseEdgesCommand(shortcut: Ctrl-R) has been added.- Node and edge labels can now snap to particular locations while moving them interactively. Both types of labels can be aligned horizontally or vertically to their original location. In addition, a node label can be aligned with the borders or the center of its owner, and during resizing of that owner, smartly keeps its relative location to the snapped position. An edge label can be snapped on the path of its owner, or at particular distances of it.
This feature can be enabled and configured with anLabelSnapContextand is available for labels with one of these label models:SmartEdgeLabelModel,FreeEdgeLabelModel,FreeNodeLabelModel, andFreeLabelModel. - Interactive label editing and creation has the following new features:
- The current label visual can be hidden while the text editor is shown to reduce visual clutter. This feature is enabled by default and can be controlled through the property
GraphEditorInputMode.HideLabelDuringEditing. GraphEditorInputModeandTableEditorInputModeprovide new eventsLabelTextEditingStartedandLabelTextEditingCanceledthat are raised directly before the label text editor is shown and after the label editing has been canceled, respectively.- Double clicking nodes and edges now opens the label editor. An existing label can be double clicked to edit the label text. This feature can be disabled with the property
GraphEditorInputMode.DoubleClickLabelEditingAllowed. IEditLabelHelperimplementations provided by theILabel's lookup can now be used to forbid or customize the editing of individual labels. ClassLabelDecoratorprovides a new propertyEditLabelHelperDecoratorto customize this feature.GraphEditorInputMode.EditLabelandTableEditorInputMode.EditLabelcan now be used withSimpleLabelinstances. This provides editing capabilities for dummy elements such as legends, page headers or other textual elements.
- Uses the various callback methods on
GraphEditorInputMode,TableEditorInputModeandIEditLabelHelperimplementations in a consistent way, regardless of how many labels or labeled items are edited or added, and independent from how the editing/label creation process has been started (e.g. through a command or programmatically through the input mode convenience methods). - Determines the actual labeled item that is modified when multiple elements are selected in a consistent way.
- The current label visual can be hidden while the text editor is shown to reduce visual clutter. This feature is enabled by default and can be controlled through the property
- Added support for UI Automation to
GraphControl.
Layout
- Added new layout algorithm
RadialLayouterthat places nodes on concentric circles. Edges are routed in a radial fashion using one of several routing strategies. - Added support for terminating (layout) algorithms prematurely. To this end, new class
AbortHandlerprovides methods for requesting early but graceful termination (see methodStop) and immediate termination (see methodCancel).The following layout algorithms have at least rudimentary support for immediate termination: Layout Algorithms Routing Algorithms Other Algorithms BalloonLayouterCircularLayouterCompactOrthogonalLayouterDirectedOrthogonalLayouterGenericTreeLayouterGRIPHierarchicGroupLayouterHierarchicLayouterIncrementalHierarchicLayouterOrganicLayouterOrthogonalGroupLayouterOrthogonalLayouterPartialLayouterRadialLayouterRecursiveGroupLayouterSmartOrganicLayouter
BusRouterPolyline.EdgeRouterOrganicEdgeRouterOrthogonalEdgeRouter
GreedyMISLabelingSALabeling
The following layout algorithms also support graceful early termination: Layout Algorithms Routing Algorithms Other Algorithms HierarchicGroupLayouterHierarchicLayouterIncrementalHierarchicLayouterOrganicLayouterSmartOrganicLayouter
Polyline.EdgeRouter
SALabeling
- Added support for parallel execution of computationally intensive tasks.
Layout algorithmsSmartOrganicLayouterandOrganicLayoutermay take advantage of multiple threads for layout calculations. Parallel execution is enabled using the algorithms'MultiThreadingAllowedproperty.
InterfaceITaskExecutorand factory classTaskExecutorFactorymake up the programmatic interface for the new concurrency support. - Introduced concept of node halos. Halos are reserved space around a node in which layout algorithms will not place other graph elements. Node halos are modelled using class
NodeHalo.The following layout algorithms support node halos: Layout Algorithms Routing Algorithms Other Algorithms BalloonLayouterCircularLayouterCompactOrthogonalLayouterComponentLayouterDirectedOrthogonalLayouterGenericTreeLayouterIncrementalHierarchicLayouterOrthogonalGroupLayouterOrthogonalLayouterRadialLayouterRecursiveGroupLayouterSmartOrganicLayouterTreeLayouter
Polyline.EdgeRouterSelfLoopLayouter
GreedyMISLabelingSALabelingInsetsGroupBoundsCalculatorMinimumSizeGroupBoundsCalculator
SmartOrganicLayouter: Added support for partition grid layout. SeePartitionGrid.
Minor Features Added
Viewer
GraphEditorInputModegot support for cyclic click selection. This helps in conveniently selecting items that are hidden behind other items. By default, this features is bound to the Alt-Key being pressed. It can be disabled by setting theCyclicSelectionRecognizerproperty toEventRecognizers.Never.ItemDropInputModeis a newDropInputModethat facilitates subclasses that support preview and snapping of the dragged item as well as highlighting potential drop targets.NodeDropInputModeandStripeDropInputModehave been refactored to useItemDropInputModeas base class.ItemHoverInputModeis a newIInputModethat fires events when the mouse enters or leaves the visualization of a graph item.GraphEditorInputModeandGraphViewerInputModeprovide a newCanvasClickedevent to detect clicks on an empty canvas location.- Node ports can now be moved by dragging their
IHandle. - When zooming while editing a label, the label text editor now stays at its minimum (maximum) size when the zoom level becomes smaller (larger) than the specified threshold. Previously, the label text editor jumped back to the size of zoom level
1.0for such values. GraphClipboardhas new propertiesCopyItems,IndependentItems, andDependentItemsthat allow for restricting the types of items that can be copied at all, independently from their owners, or implicitly through their owners, respectively.GraphViewerInputModeandGraphEditorInputMode: TheirClickInputModenow delivers both left and right clicks.GraphViewerInputMode: The click hit test order can now be configured by propertyClickHitTestOrder.GraphEditorInputModeandGraphViewerInputModeprovide an explicit hit test order for double clicks that can be changed through theDoubleClickHitTestOrderproperty. By default, this hit test order prefers labels over other graph elements.- Added new methods
ClickInputMode.PreventNextDoubleClickandTapInputMode.PreventNextDoubleTapthat can be used in event handlers for single clicks/taps to prevent that this click can become part of a double click event. NodeDropInputModecan now optionally drop nodes onto leaf nodes and thus convert the leaves into group nodes. Also it is possible to drop nodes into collapsed folder nodes. For both use-cases, an opt-in property has been added and a predicate property allows for fine-grained control over this feature.- Similarly, leaf nodes can now be the target of a reparenting gesture if the property
GraphEditorInputMode.ReparentToLeavesAllowedis enabled. In this case, leaves are converted into group nodes. - Added support for deleting bends in a way that an orthogonal edge remains orthogonal after removing the bends. The new property
GraphEditorInputMode.OrthogonalBendRemovalenables/disables this feature. GraphViewerInputModenow supports multi-selection via Ctrl+Click and marquee selection. The latter is disabled by default.OverviewInputModeand theGraphOverviewControlhave been optimized to improve the user experience when used on touch devices.OverviewInputModecan be customized more easily. Minor modes can be replaced and adjusted, as well as the list of available default command bindings can be modified.- Improved
GraphModelManagerto allow for easier customizations. PropertyUseHierarchicNestingwas added to allow for adding custom logic that uses a different approach to hierarchic nesting. Also the return types of some of the factory methods where made less restrictive to allow for further modifications. FoldingManagernow offers two convenience methods,UpdateViewStates(INode)andUpdateViewStates(IEdge), that will trigger update calls onIDummyNodeConverterandIDummyEdgeConverterfor elements that are currently being displayed in a view. This makes it easier to synchronize state between the master graph and the folded graph views in case this is not automatically performed by the default implementation.
Layout
BalloonLayouter: Added support for integrated node and edge labeling. See new propertiesIntegratedEdgeLabeling,IntegratedNodeLabeling, andNodeLabelingPolicy.BalloonLayouter: Added support for different policies to align nodes having the same root node. See new propertyChildAlignmentPolicy.BalloonLayouter: Added support for interleaved child node placement. With interleaved placement, child nodes are placed at different distances to their parent node to achieve a more compact layout. See new propertyInterleavedMode.IncrementalHierarchicLayouter: Improved partition grid support. Nodes can now be mapped to a multi-lane partition cell identifier, i.e., a cell spanning multiple columns and rows. See classPartitionGrid.IncrementalHierarchicLayouter: Improved edge label placement. Edge labels with preferred placement at source/target are placed closer to the corresponding node. Additionally,SimplexNodePlaceroffers the option to place adjacent edge labels in a compact, stacked style. See new propertyLabelCompaction.Polyline.EdgeRouter: Added a fine-granular configuration option to weigh the crossing costs for each label using the data provider look-up keyEdgeRouter.LabelCrossingCostFactorDpKey.Polyline.EdgeRouter: Added propertyIgnoreInnerNodeLabelsthat allows to ignore node labels that are inside the bounds of their owner so they may be crossed by edges. This is especially useful if labels of group nodes may be crossed while outer labels of non-group nodes may not.Polyline.EdgeRouter: Added support for customizing the order in which edges are routed. See new propertyEdgeOrderComparator.GenericTreeLayouter: When enablingGenericTreeLayouter.IntegratedNodeLabelingand/orGenericTreeLayouter.IntegratedEdgeLabeling, the respective labels will be taken into account during the calculation of group bounds.DelegatingNodePlacer: Added keyDelegatingNodePlacer.LeftRightDpKeythat allows choosing on which side a node is placed.PartialLayouter: Now supports handling of directed and undirected edges. See data provider keyDirectedEdgesDpKey.FixNodeLayoutStage: Added additionalFixPointPolicysUpperRight,LowerRight, andLowerLeft.LabelLayoutTranslator: Added propertiesWriteBackRelativeEdgeLabelLocationandWriteBackRelativeNodeLabelLocationthat allow a core layouter to specify new node or edge label locations relative to the label's owner.LabelLayoutKeys: Added keyIGNORE_LABEL_KEYthat allows specifying which edge and node labels should be ignored during layout calculations.- Added new class
OrganicRemoveOverlapsStagethat removes node overlaps while respecting a specified minimal node distance. Unlike the approach implemented in classRemoveOverlapsLayoutStage, this approach tries to keep the original layout structure, i.e., it tries to keep the geometric distance between the nodes. - Added class
StraightLineEdgeRouterthat routes edges as straight lines considering specified port constraints.
Improvements
Viewer
- Various performance improvements for the rendering and the selection handling. This affects, amongst others,
ShapeNodeStyleand styles that use aGeneralPath. GraphEditorInputMode.DetailSelectionRecognizeris now also applied for double clicks to determine the clicked item.GraphEditorInputModeandGraphViewerInputModedon't select or focus graph items styled with a void style (VoidNodeStyle,VoidEdgeStyle,VoidLabelStyle, andVoidPortStyle). The new propertyVoidStylesIgnoredspecifies whether this feature is enabled.GraphEditorInputModeandGraphViewerInputMode: the new protected methodShouldSelectcan be overridden to determine whether an item can be selected in general.DropInputMode: Added propertyLastDragEventArgs.OverviewInputMode: The new propertyMarginsspecifies margins for the visible area of the boundGraphOverviewControl. The new protected methodUpdateVisibleAreaprovides further means for customizing the visible area.CompositePositionHandler: Added methodsGetPositionHandlerandGetHandleto retrieve an earlier addedIPositionHandlerorIHandle.PortRelocationHandles now triggers theEdgePortsChangedevent of theGraphEditorInputMode.EdgeStyleDecorationInstallercan now be used with self loops without bends, too.ContextConfigurator: The new propertyZoomdetermines the zoom value that should be assumed on the canvas when creating the visual. This can affect the rendering of zoom dependent visuals.TableLayoutConfigurator: Improved support for routing algorithms.IGraph: The collection models of graph items returned by the propertiesNodes,Edges, etc. now support the methodsRemoveandClearto remove graph items from the graph. Note that calling the methodAddis still not allowed.GraphModelManager: New callback methodOnGraphChanged.LayoutExecutor: The new propertyConsiderViewportLimitercan be enabled to let the target viewport after a layout respect theViewportLimiterof theGraphControl.
TheViewportAnimationhas a new propertyConsiderViewportLimiterfor the same purpose.LayoutGraphAdapternow adds data providers that map each node, edge and label of aLayoutGraphto their correspondingIModelItemin the originalIGraph. Especially, these data providers are available if a layout is run with aLayoutExecutoror the convenience methodsLayoutExtensions.MorphLayoutandLayoutExtensions.ApplyLayout.GeomSupport: The new methodCreateSmoothedPathcreates a new path as copy of a given one but with smoothed bends.IconLabelStyle: The icon is added to the hit test area for mouse clicks and marquee selection. This can be switched off by overridingIconLabelStyleRenderer.ShouldHitTestIcon.CanvasControl: MethodFitContentnow respects theViewportLimiter. This might result in zoom levels greater than1.0.DefaultDummyEdgeConverternow synchronizes theTagproperty of the first label if label synchronization is enabled.GraphCopierhas been improved to facilitate manipulation of the copied items:- The new events
NodeCopied,EdgeCopied,LabelCopied, andPortCopiedare dispatched after a model item has been copied. - The method
GetOrCreateCopy<T>is now public to facilitate copying of, for example, node tags.
- The new events
GraphClipboard: In hierarchically organized graphs, nodes are now pasted into their previous parent group, the group at their target position, or the root, depending on the new propertyParentNodeDetection.- Automatic installation of the integrated API documentation is now available for Visual Studio 2013 and 2015 and enabled for all supported Visual Studio versions by default.
Algorithms
Dfs: Added methodCancelthat can be used by subclasses to cancel the search.Cycles: Improved methodFindCycleto stop the search as soon as the first cycle has been found.GraphConnectivity: Improved methodMakeBiconnectedto work with graphs with self-loops (i.e. edges whose source node is also the target node).Groups: Replaced recursive implementation of methodBiconnectedComponentGroupingwith an iterative algorithm to support larger graphs.
Layout
IncrementalHierarchicLayouter: The default sequencing phase has been improved to produce less crossings and run faster.IncrementalHierarchicLayouter: Now prevents overlaps among same layer edges attached to group nodes.IncrementalHierarchicLayouter: Selfloop routing now takes the layout flow into account. For layout orientation top-to-bottom, selfloops will by default exit on the left or right and enter on top.IncrementalHierarchicLayouter: Added option to route selfloops like backloops (starting at the bottom of the node and ending at the top of the node) when backloop routing is enabled.IncrementalHierarchicLayouter: During layering, edges connected to group nodes may be redirected and replaced by dummy edges connected to the children of the group node. For these dummy edgesILayoutDataProvider.GetEdgeDatanow returns anIEdgeDataof the new typeEdgeDataType.RedirectedGroupEdge.PCListOptimizer: Improved port candidate assignment calculated by methodOptimizeAfterSequencing.SmartOrganicLayouter: Now uses a more sophisticated approach to remove node overlaps if the scope is set toScope.Alland the quality to time ratio is greater than or equal to0.7(propertyQualityTimeRatio).InteractiveOrganicLayouter: MethodStartLayoutnow takes advantage of multiple threads for layout calculation which may reduce the required runtime.BalloonLayouter: Reduced gaps between adjacent nodes.PartitionLayouter: Added nested classPartitionLayouter.PolylineInterEdgeRouterthat routes inter-edges using classPolyline.EdgeRouter.PartialLayouter: Now considers port constraints independent of the specified layout orientation. Note that port constraints are only considered if the core layout algorithm supports port constraints as well.PartialLayouter.StraightLineEdgeRouter: Added support for port constraints.RecursiveGroupLayouter: Added optionReplacePortConstraintsthat replaces port constraints by port candidates and, thus, may improve the layout result.Polyline.EdgeRouter: Improved support for port candidate sets (see classPortCandidateSet).Polyline.EdgeRouter: Rerouting improved to provide better results.Polyline.EdgeRouter: Memory usage has been reduced.Polyline.EdgeRouter: Added penalty setting for edge length. SeePenaltySettings.EdgeLengthPenalty.Polyline.EdgeRouter: Added four predefined optimization strategies. SeePenaltySettings.OptimizationBalanced,PenaltySettings.OptimizationEdgeBends,PenaltySettings.OptimizationEdgeCrossings, andPenaltySettings.OptimizationEdgeLengths.Polyline.EdgeRouter: Default penalty settings for minimal node to edge distance, minimal group node to edge distance, minimal first and last segment length, and bends in node to edge distance increased. As a result, these restrictions are considered more strongly.Polyline.EdgeRouter: Now avoids very small octilinear segments.Polyline.EdgeRouter: Edge grouping improved to keep edge segments grouped longer and to consider the paths of fixed edges when calculating the paths of edges having the same edge group.Polyline.EdgeRouter: When using polyline routing, short orthogonal edge segments in a monotonic path section are replaced by a single diagonal segment instead of a short diagonal segment followed by an orthogonal segment followed by a second short diagonal segment.DirectedOrthogonalLayouterandOrthogonalGroupLayouter: Added optimization step that reduces the number of perceived bends. See new propertyPerceivedBendsOptimization.OrthogonalLayouter,OrthogonalGroupLayouterandDirectedOrthogonalLayouter: Added optimization step that aligns degree one nodes (i.e. nodes with one incident edge) that have the same neighbor. See new propertyAlignDegreeOneNodes.OrthogonalGroupLayouter: Improved routing and edge labeling for self-loops of normal (non-group) nodes.LayoutTool: Added new rectangle arrangement methodArrangeRectangleMultiRowssuitable for arranging rows of rectangles with highly different sizes.ComponentLayouter: Added the following new component arrangement strategies toComponentArrangementStylesthat are suitable for components with highly different sizes:MultiRows,MultiRowsCompact,MultiRowsHeightConstrained,MultiRowsHeightConstrainedCompact,MultiRowsWidthConstrained, andMultiRowsWidthConstrainedCompact
Demos
- The new demos
Demo.yFiles.Graph.Bpmn.ViewandDemo.yFiles.Graph.Bpmn.Editorare more complex demos that show how yFiles can be customized to create ambitious BPM Editor and BPM Viewer. - The new demo
Demo.yFiles.Graph.LargeGraphsillustrates the support for very large graphs in yFiles WPF. It shows various techniques that can help in improving the rendering performance for large graphs. Amongst other things, it shows level of detail styles for nodes, edges, and labels. - The new demo
Demo.yFiles.Graph.Eventsshows how to register to the various events provided by the graph, the input modes, and theGraphControl. - The new demo
Demo.yFiles.Graph.NetworkMonitoringis a demo for a basic network monitoring tool. You can watch the traffic flowing through an imaginary network and influence it by deactivating nodes. - The new demo
Demo.yFiles.Graph.Input.MoveUnselectedNodesshows how to use and configure a modifiedMoveInputModewhich lets the user move nodes without selecting them first. - The new demo
Demo.yFiles.Graph.Input.LabelEditingshows customizations of the interactive label editing made possible by the improvements of the label editing, for example input validation and instant typing. - The demo
Demo.yFiles.GraphEditornow supports changing the style of a label, drag'n'drop ports with aSimplePortStyleand editing nodes with aTableNodeStyle. - The new demo
Demo.yFiles.Layout.AbortHandlershows how the new classAbortHandlercan be used to stop a layout algorithm which is running in the background. - The demo
Demo.yFiles.Layout.InteractiveOrganicwas simplified. Now, it uses the events provided byMoveInputModeinstead of a customIPositionHandlerimplementation. - The demo
Demo.yFiles.Graph.IntegratedNodeStyledemonstrates a custom node style that renders its labels and ports on the same layer as itself. This results in labels and ports being hidden behind other nodes and edges that are rendered in front of the item that they belong to. - The demo
Demo.yFiles.Graph.Input.HandleProvidernow also shows how to implement a handle which supports rotation of labels. - The demo
Demo.yFiles.Graph.UIAutomationdemonstrates how to use the new UI Automation support. - The new step
24 Zoom Invariant Label Styleof the Style Tutorial shows a label style that renders labels always at the same size regardless of the zoom level. - The new step
25 Bridge Supportof the Style Tutorial shows how to add support for bridges to a custom edge style. - Various aspects of the
InputDemoshave been improved: more concise sample code, more meaningful descriptions and comments, and nicer overall appearance.
Incompatible Changes
Changes in Default Behavior
GraphEditorInputModenow by default supports the newGraphCommands.DuplicateCommandthat is bound to keyboard shortcut Ctrl-D. If this behavior is undesired new behavior, theDuplicateAllowedproperty can be set tofalse.- The clipboard now supports copying and pasting of items independently from their owning elements. E.g. single selected labels can be copied to other elements, as well as edges without their source and target nodes. This behavior can be reverted to the old behavior by setting
GraphClipboard'sIndependentItemstoNone. GraphEditorInputModenow by default allows for reversing selected edges using the Ctrl-R keyboard shortcut and the newGraphCommands.ReverseEdgeCommand. This new behavior can be turned off by setting theEdgeReversalAllowedproperty tofalse.ClickInputMode: IfActiveButtonsincludesMouseButtons.Right, the original right click event is marked as handled if ClickInputMode's event handlers mark the higher level click event as handled. Especially, no context menu will be shown if the right click is handled by ClickInputMode itself.GraphEditorInputModeandGraphViewerInputMode: The default click actions that change the selection and create new nodes are only triggered on left mouse clicks now.- Previously, ports at nodes and edges that were copied and pasted to and from the clipboard were all copied, even if there where no edges attached to them after the operation. Now those empty ports are not copied/pasted anymore unless the
PortDefaults'AutoCleanupproperty is set to false or they were unoccupied before the operation already. In order to restore the old behavior, where all ports were copied, regardless of edges where adjacent to them, make sure to include them in the core predicate, since this behavior change just affects ports that had previously not been accepted by the core predicate function. CanvasControl: MethodFitContentnow respects theViewportLimiter. This might result in zoom levels greater than1.0.GraphEditorInputMode'sNodeCreatedevent may now report nodes that are not part of the graph, when the user has dropped a node viaNodeDropInputModeand the newNodeDropInputMode.FolderNodeParentsAllowedproperty is enabled. By default this feature is disabled, though.IReparentNodeHandler'sIsValidParentmethod may now also be queried if the newGraphEditorInputMode.ReparentToLeavesAllowedproperty is enabled. By default this property is disabled, though. Note that the method will also be queried if the reparent handler is used outside the context ofGraphEditorInputMode.IValueSerializerContext.Instanceinside GraphML writing code now provide the object that should be converted, not the parent object. If you need to access the actual parent object, you can use theOwnerproperty on theGraphMLValueSerializerContextimplementation of this interface.GraphMLIOHandler.QueryReferenceIdnow never is fired forMarkupExtensionsand other proxy objects for serialization, only for the original object references.Polyline.EdgeRouter: MethodDoLayoutnow throws anArgumentExceptionif there is a node with zero width or height in the given graph.FixedGroupLayoutStage: MethodOrthogonalEdgeRouternow returns an instance of classPolyline.EdgeRouterinstead of classOrthogonalEdgeRouter.ComponentLayouter: PropertyPreferredLayoutSizenow throws anArgumentExceptionwhen setting the preferred size to negative values or zero.- Changed default behavior of edge label placement in layouters with integrated edge labeling when using
LabelPlacements.Anywhere. Now edge labels are placed on the edge and in the center between source and target node. This change affects the following layout algorithms:IncrementalHierarchicLayouter,OrthogonalLayouter,OrthogonalGroupLayouter,DirectedOrthogonalLayouter,GenericTreeLayouter, andLabelLayoutDataRefinement. LabelCandidateDescriptor: The default values of the propertiesEdgeOverlapPenaltyandNodeOverlapPenaltyhave been changed to0.0. Values greater than0.0trigger a known issue in all generic label placement algorithms that erroneously rejects all potential candidates. As a result, no suitable placement is calculated in this case.MoveInputModeaccepts mouse hovers with the Shift key held down again. This restores the default behavior before yFiles for WPF 2.4.0.2.GraphEditorInputModeandGraphViewerInputMode: By default, graph items styled with a void style (VoidNodeStyle,VoidEdgeStyle,VoidLabelStyle,VoidPortStyle) won't be selected or get the focus.GraphEditorInputMode'sClickHitTestOrderproperty default value has changed. Now it does not contain the redundantGraphItemTypes.Allas the last element in the array anymore.GraphViewerInputMode: By default, clipboard commands are now disabled. This can be controlled with the new propertyClipboardCommandsEnabled.- The default keyboard shortcut for deselecting elements (
GraphCommand.DeselectAllCommand) has been changed toCtrl+Shift+A.Ctrl+Dis now the default shortcut for duplicating selected elements (GraphCommand.DuplicateSelectionCommand). Duplicating elements can be disabled via theDuplicateAllowedproperty. GraphEditorInputMode.ShouldBeMarqueeSelectedis no longer queried by thePastecommand to determine the items which should be selected after paste. Instead, the new methodGraphEditorInputMode.ShouldBeSelectedAfterPasteis queried. Note thatGraphEditorInputMode.ShouldBeMarqueeSelectedstill is queried to determine the items which should be selected by marquee selection.- Now, all pasted items are selected after a
Paste(was: only nodes, edges, and bends). This can be configured via the newPasteSelectableItemsproperty inGraphEditorInputModeand the correspondingShouldBeSelectedAfterPastemethod. - The hit test order for double clicks in
GraphEditorInputModeandGraphViewerInputModeis now controlled through the separateDoubleClickHitTestOrderproperty. By default, this hit test order prefers labels over other graph elements. - If
ClickInputModeis configured to deliver both single and double clicks, double clicks are not reported if the first click has created a new node or if cyclic selection is currently active. The same holds forTapInputModeand single/double taps. - The
Rotatehandle visualization is now a single circle, its very thin central point has been removed. - The
ThemeInfoattribute declaration on the viewer assembly now specifiesNoneinstead ofSourceAssemblyfor the theme-specific resource location. Since even the value ofSourceAssemblywould load a suitably-named theme assembly (despite the documentation and name) this would break code that relied on that assembly being loaded. However, this change eliminatesFileNotFoundExceptionsfor these non-existent assemblies that may occur at program startup. - The segment index for label model parameters of
SliderEdgeLabelModelandSideSliderEdgeLabelModelnow is related to the visible segments for edges styled withPolylineEdgeStyle. - If an
IEditLabelHelperimplementation is present in anILabel's lookup, itsEditLabelmethod is now called in addition to an eventual owner's edit helper when the label text is edited. If implementations are present for both the label and the owner, editing is only allowed if both helpers returntrue. Additionally, the predicate methodGraphEditorInputMode.ShouldLabelBeEditedalways has to returntrue, whether edit helpers are present or not. - The label that is edited is now determined in the following order:
- If a label is explicitly provided as a command parameter or through a convenience method or is the only selected element, it is edited if the previous condition is satisfied. No other candidates are tried in that case.
- If a label owner is explicitly provided as a command parameter or through a convenience method, or is the only selected element, the first label that satisfies the condition above is edited if the previous condition is satisfied. If no such label exists, a new label is be added, provided that the owner allows adding. In either case, no other candidates are tried.
- The first selected label for which the previous condition is satisfied.
- If multiple label owners are selected, the first owner that has a label for which the previous condition is satisfied (in which case that label is edited).
- If
IEditLabelHelper.EditLabelfor either an editable label or its owner provides a different label instance, this instance is edited instead. - Otherwise, a label is added if an eligible owner can be found (see below).
- If an
IEditLabelHelperimplementation is present in anILabeledItem's lookup, itsAddLabelmethod is called to determine whether a label may be added and provide a suitable label instance. Additionally, the predicate methodGraphEditorInputMode.ShouldLabelBeAddedalways has to returntrue, whether edit helpers are present or not. If the new label should be edited interactively after it's creation (the default behavior), it also must be editable, following the rules above. Therefore anIEditLabelHelperimplementation usually should allow editing of label instances that it has created itself inAddLabel. - The label owner for which a label is added is now determined in the following order:
- If a label owner is explicitly provided as a command parameter or through a convenience method, or is the only selected element, a label is added if the previous condition is satisfied. No other candidates are tried in that case.
- If multiple label owners are selected, the first one for which the previous condition is satisfied.
API Changes
-
Changed
SnapLineto support non-orthogonal snap lines as well: its propertiesFromandTohave been changed from typedoubletoPointD, its propertyOrientationwas removed, and its constructors have been changed accordingly.Orthogonal snap lines are now modeled by class
OrthogonalSnapLine. It extendsSnapLineand provides the propertyOrientation. Existing API uses eitherSnapLineorOrthogonalSnapLine, depending on whether it works only with orthogonal snap lines or not.As a consequence, in class
SnapLineSnapResult, the propertySnapLinereturns a non-orthogonalSnapLineand the propertyDeltareturns aPointDinstead of adouble. API related toGraphSnapContextstill works only with orthogonal snap lines and usesOrthogonalSnapLine. - The
Keyproperty onSingleLineSnapLineControl,FixedDistanceSnapLineControl, andInBetweenSnapLineControl, has been made read only. GraphModelManager's factory methods for creating the installers now have a less restrictive return type. The default implementation still returns the same types as before, though.GraphClipboard's factory methods for creating the predicates for the various cut and copy operations now require a second argument that is the graph that the predicate is working on. Usages typically use the graph in the graph control where the selection is also being used. If the default graph selection implementation is used. The graph instance can be obtained from its corresponding property.GraphModelManager's installer related properties now use a weaker return type to simplify subclassing with new functionality. The instances used are the same and can be down-casted accordingly to the more specific types as documented.AlgorithmAbortedException: Removed overloaded methodsCheck. Client code that needs to terminate layout calculations prematurely must use new classAbortHandlerinstead.- Moved classes
PartitionGrid,PartitionCellId,RowDescriptor, andColumnDescriptorfrom packageyWorks.yFiles.Layout.Hierarchic.Incrementalto packageyWorks.yFiles.Layout.Grid. IItemFactory: Added methodCreateRedirectedGroupEdge.LayeredNodePlacer: Removed data provider keyDpKeyDistanceToParentMapfrom public API, since it is for internal use only.Polyline.EdgeRouter: MethodDoLayoutnow throws anArgumentExceptionif there is a node with zero width or height in the given graph.Polyline.EdgeRouter: Penalty settings have been changed to double precision. See classPenaltySettings.PathSearch: Signature of methodCalculateCostshas changed. It now takes an additional double array as parameter that is populated with the calculated costs instead of returning a new array.DrawingEmbedder: Removed public methodPreprocessNodesand protected methodPrintStatistics.GraphClipboard's protected methodCopy(IGraph, Predicate>IModelItem>, IGraph, ElementCopiedDelegate)which was called byCut,Copy, andPasteto invoke theGraphCopierhas been split:Copy(IGraph, Predicate >IModelItem>, IGraph, ElementCopiedDelegate)now is called only byCutandCopy.Pastenow invokes the new methodPaste(IGraph, Predicate >IModelItem>, IGraph, ElementCopiedDelegate, Predicate >IModelItem>).- The type of
GraphMLAttribute'sSerializableproperty has been changed fromboolto the enumGraphMLSerializationMode. GraphEditorInputModeandTableEditorInputMode: return value of callback methodsOnAddLabelandOnEditLabelhas been changed fromvoidtobool. The return value should specify whether the operation in question was successful.
Bugfixes
Viewer
FoldedGraphdetects more carefully what has changed before invoking the methodsCreateDummyEdgeAppearanceandChangeDummyEdgeAppearanceofIDummyEdgeConverter. Previously, in some cases, these methods were called to often or not at all.- When both a group node and its child node were resized together the group node bounds shrunk to its original bounds once the child had reached the original bounds.
- Fixed problem in
LayoutGraphAdapterwhere label candidates for edge labels were not always determined correctly. - Fixed
LayoutGraphAdapterproducing threading issues whenPortCalculatorwas used during a multi-threaded layout. - When snapping was disabled temporarily (using Ctrl) during a move gesture the moved item snapped after finishing the gesture, anyway.
FoldedGraphUndoSupportdidn't add the correct bend information to its internal data structures.CreateEdgeInputMode: Fixed some problems with mixed mouse and touch input.- When using an
IEditLabelHelperand adding a label interactively, the helper'sEditLabelcallback was called instead ofAddLabel. - Newly added labels could have had an empty size when an
IEditLabelHelperinstance was registered. - When a highlighted item was removed from the graph, the highlight was not cleaned up.
- Reparenting an empty group node displayed the target node highlight around the reparented node.
- The modified
MoveInputModecreated byMainInputMode.CreateMoveUnselectedInputModechanged the cursor to indicate a movable object even when themodifierRecognizerdisabled moving. - When both a group node and its child node were resized together the group node bounds shrunk to its original bounds once the child had reached the original bounds.
ClickInputMode: Cancelling the mode during clicks didn't work correctly and as a result, the location reported for the next click might have been wrong.CreateEdgeInputModenow copies the dummy edge's tag to the created edge. This could have caused issues when theEdgeCreationStartedwas used to set a custom tag on the dummy edge.- When the pressed status of the Shift key changed during a reparenting gesture of a node, the bounds of its containing group node were not immediately updated.
- The secondary multi-tap gesture was not recognized correctly.
- When snapping was disabled temporarily (using Ctrl) during a move gesture the moved item snapped after finishing the gesture, anyway.
- Labels whose positions were determined by
NinePositionsEdgeLabelModel,SliderEdgeLabelModel, andSideSliderEdgeLabelModelmight have disappeared when one or more edge segments were hidden under the source or target node. SnapContext: Snap results with anulltag were erroneously always discarded.GeneralPath#Transformand other GeneralPath methods usingMatrix2Dapplied the transformation matrix incorrectly in the case of a rotation.BevelNodeStyle: Fixed update of drop shadow afterRadiushas been changed.IconLabelStyle: MethodGetBoundsinIconLabelStyleRendererreturned a valid rectangle even if the label layout was invalid. As a consequence,IsVisibleerroneously returnedtruefor labels with invalid bounds.- The lookup of
CollapsibleNodeStyleRendererwas missing the correct results forIGroupBoundsCalculator,ISizeConstraintProvider, andIShapeGeometry. - The lookup of
ShadowNodeStyleDecoratorRendererwas missing the correct result forIShapeGeometry. - The
Nameproperty of theGraphMLAttributewas not considered during deserialization. - Write events in
GraphMLwere not always raised. - After setting an
ICanvasObjectGroup'sVisibleproperty tofalsethe group was still visible. CanvasControl.EnsureVisiblehasn't worked for bounds larger than the current viewport.- Setting the view point on a
CanvasControlwith a width or height of 0.0 could cause an exception if aViewportLimiterwas enabled. GraphCopierthrew anConcurrentModificationExceptionif the source and the target graph are identical.CanvasPrintDocumentdid not forward the print options to aPrintDialogwhich is opened from within a print preview.- Prevent an
ArgumentNullExceptionin the print preview of theCanvasControl. - When the
SelectionPaintManagerwas disabled and a customFocusPaintManagerwas used nodes styled withNodeControlNodeStylemight not always have been updated after selection changes. GraphEditorInputModeandGraphViewerInputModenow respect theMultiSelectionRecognizerfor extending an existing selection via marquee.- Fixed
TableEditorInputModeexhibiting problematic behavior under certain circumstances when theGraphControl's graph is replaced. - GraphML could write incorrect values for bend tags.
Layout
- Running any label placement algorithm had no effect for node/edge labels if the properties
RemoveNodeOverlaps/RemoveEdgeOverlapswere enabled because all potential candidates were erroneously rejected. AbstractLabelingAlgorithm: Fixed bug that may cause removal of labels that don't overlap with other elements if optionRemoveNodeOverlapsis enabled.IncrementalHierarchicLayouter: Fixed rareInvalidOperationExceptionthat may appear for grouped graphs containing nodes with fixed coordinates hint (see, e.g.,IncrementalHintsFactory.CreateUseExactCoordinatesHint).IncrementalHierarchicLayouter: Fixed bug that breaks incremental hints of grouped edges in incremental layout mode. (seeIncrementalHintsFactory.CreateSequenceIncrementallyHint).IncrementalHierarchicLayouter: Fixed bug that may cause a wrong order of fixed (non-incremental) elements if the layouter is applied in incremental mode and the graph contains sequence constraints.BorderLine: Fixed bug in methodGrowthat may result in anArgumentExceptionbecause the minimum value of a BorderLine becomes greater than the maximum value.Polyline.EdgeRouter: Fixed bug that may cause zero length routes of edges whose start and end point are at the same location.IncrementalHierarchicLayouter: Fixed possibleIndexOutOfRangeExceptionthat may occur for grouped graphs in incremental mode with recursive group layering enabled.IncrementalHierarchicLayouter: Fixed possible exception caused by inconsistent grouping.IncrementalHierarchicLayouter: Fixed broken edge routes that may occur for edges with labels ifSimplexNodePlacer's optionEdgeStraighteningOptimizationis enabled.IncrementalHierarchicLayouter: Fixed minimum edge length for orthogonal edges. It is now also taken into consideration for edges that connect to a node's side and for backloop edges.IncrementalHierarchicLayouter: Fixed possibleIndexOutOfRangeExceptioninPCListOptimizerthat may appear if there are port constraints which have no matching port candidate or port candidate set entry.SmartOrganicLayouter: Fixed bug that caused weird placement of fixed elements if the minimal node distance is set to 0.MultiPageLayouter: Fixed possibleNullReferenceExceptionif the input graph contains empty group nodes.MultiPageLayouter: Fixed possibleInvalidCastException.PartialLayouter: Fixed broken edge routes that may appear if optionEdgeRoutingStrategyis set toEdgeRoutingStrategyOctilinear.Polyline.EdgeRouter: Fixed wrong heuristic bend calculation if grid is used.BusRouter: FixedNullReferenceExceptioninBusRepresentationsthat could appear if the input graph contains overlapping nodes.OrganicEdgeRouterModule: Fixed optionUse existing bendswhich was ignored in previous versions.FixedGroupLayoutStage: FixedcanLayoutwhich changed the structure and layout of the graph.IncrementalHierarchicLayouter: Fixed possibleIndexOutOfRangeExceptionifPortConstraints are used together withPortCandidateSets.Polyline.EdgeRouter: Minimum first and last segment length and minimum node to edge distance were sometimes ignored when used together with octilinear routing style.Grouping: Fixed bug in methodNearestCommonAncestorthat sometimes caused wrong results if one of the specified nodes is the ancestor of the other node.InsetsGroupBoundsCalculator: Fixed methodCalculateBoundsto consider only the given child nodes and all edges between those child nodes instead of all nodes and all edges in the graph.GenericTreeLayouter: FixedNullReferenceExceptionthat occurred when usingLayeredNodePlaceras default node placer.LayoutTool: Fixed calculation of lower width bound in methodArrangeRectangleRows. Due to the better bound, the optimization procedure now needs less steps, especially for graphs with very wide components. Note, that the results may also slightly differ, because the optimization may now stop with slightly different values.SALabelingandGreedyMISLabeling: Fixed possibleNullReferenceExceptioncaused by labels with zero width/height and a "free" edge label model.IncrementalHierarchicLayouter: Fixed bug that caused wrong coordinates of empty rows (see classRowDescriptor) whose minimum height is zero.DirectedOrthogonalLayouter: Fixed a bug that sometimes caused misplaced edge labels of grouped edges.Polyline.EdgeRouter: Fixed possibleNullReferenceExceptionfor edge groups that contain fixed edges.Polyline.EdgeRouter: Fixed bug that caused wrong routes for edges grouped with fixed edges.
yFiles WPF 2.4.0.6 - Changes Since 2.4.0.5
Bugfixes
RotatedSideSliderEdgeLabelModel: Label model parameters of this model were serialized as the respective parameters ofRotatedSliderEdgeLabelModel. Thus, after loading, the positions of the labels are the expected ones but the label models changed.RotatedSliderEdgeLabelModel: Parameters with ratio 0.5 were not correctly deserialized from GraphML.FilteredGraphWrapper: TheEdgesAtmethods erroneously returned edges that were marked as hidden by theEdgePredicate. The methodsDegree,InDegree, andOutDegreeare based on these methods and were affected, too.GraphSnapContext: Snapping nodes to vertical edge segments was not working ifNodeToEdgeDistancewas set to 0.CollapsibleNodeStyleDecoratorandShadowNodeStyleDecorator: Lookup requests forISizeConstraintProvider,IGroupBoundsCalculator, andIShapeGeometryare now correctly delegated to the wrapped style.- The
EdgeStyleDecorationInstallerdid not copy the tags of dummy ports and edges used when displayed in view coordinates (ZoomMode=DecorationZoomMode.ViewCoordinates).
Automatic Layout
OrthogonalLayouterfailed almost always with anArrayIndexOutOfRangeExceptionif the Mixed Layout style was used.IncrementalHierarchicalLayouter: Fixed possible exception caused by inconsistent grouping. The problem may only occur in incremental mode and if there are sequence constraints.BusRouter: FixedNullReferenceExceptionthat may appear for graphs containing isolated nodes with self-loops.TreeReductionStage: Fixed wrong handling of group nodes which may cause aWrongGraphStructureexception as well as broken routes of edges incident to group nodes.- Fixed
NullReferenceExceptionwhen usingAssistantPlacertogether with distributed port assignment. CircularLayouter: Fixed issue that may cause infinite/too large node coordinates for unfavorable input settings, for example, if the maximal deviation angle is to small. Note that such coordinates may produce infinite looping or other exceptions.
yFiles WPF 2.4.0.5 - Changes Since 2.4.0.4
Bugfixes
GraphMLIOHandler: methodAddNamespacehad no effect, and adding a custom schema withAddSchemaLocationtriggered an exception.ContextConfigurator: propertyScaledid not throw an exception for invalid values. This also led to several demos being broken.- Worked around several errors that were erroneously reported by
PEVerify. Runtime verification behavior was not affected by these.
Automatic Layout
Polyline.EdgeRouter: Fixed wrong heuristic bend calculation if grid is used.BusRouter: FixedNullReferenceExceptioninBusRepresentationsthat could appear if the input graph contains overlapping nodes.MultiPageLayouter: Fixed possibleNullReferenceExceptionif the input graph contains empty group nodes.MultiPageLayouter: Fixed possibleInvalidCastExceptionif group node insets are specified with classyWorks.yFiles.Util.Geom.Insets.IncrementalHierarchicLayouter: Fixed broken edge routes that may occur for edges with labels if there are "critical" edges, seeCriticalEdgeDpKey.SimplexNodePlacer: Fixed broken edge routes that may occur for edges with labels if optionStraightenEdgesis enabled.IncrementalHierarchicLayouter: FixedArgumentException(Graph is not acyclic) inSimplexNodePlacerthat could appear when sequence constraints were added to a graph with swimlanes and group nodes.BorderLine: Fixed rareArgumentExceptionthat was caused by numerical instability.IncrementalHierarchicLayouter: FixedArgumentExceptioninConstraintIncrementalLayererthat could appear when layer constraints were added in incremental mode.CircularLayouter: Fixed possibleNullReferenceExceptionwhen layout style is set toBccIsolatedand consider node labels is enabled.AbstractLabelingAlgorithm: Fixed bug that causes poor results if optionRemoveEdgeOverlapsis enabled and the labels should be placed on the edge.
Known issues
- GraphML serialization of node label model parameters that are created with
FreeNodeLabelModel.CreateNodeRatioAnchoredis incorrect (the y ratio value is inverted). A fix for this issue will be part of the next feature and/or major relase, since this would introduce an incompatible change in behavior.
yFiles WPF 2.4.0.4 - Changes Since 2.4.0.3
Bugfixes
Folding: Source port tags in view states were not parsed correctly from GraphML.BevelNodeStyle: Fixed update of drop shadow afterRadiushas been changed.CreateEdgeInputMode: Mixing touch and mouse gestures did not always work as expected.FilteredGraphWrapper.Disposedid not clean up all event listeners.- Node ports could not be moved by dragging their
IHandle. - Image export: Custom selection visualizations created with
NodeStyleDecorationInstaller,LabelStyleDecorationInstallerandEdgeStyleDecorationInstallerin zoom invariant mode were not placed correctly. PixelImageExporter: The default node and label selection markers were not exported correctly.
Automatic Layout
IncrementalHierarchicLayouter: FixedArgumentExceptionthat may appear for graphs containing nodes with fixed coordinates.LabelLayoutDataRefinement: Fixed possibleInvalidCastExceptionfor unbuffered layout runs.RecursiveGroupLayouter: Removed all temporarily inserted port candidates before calling the inter-edge routing because otherwise the edges routes may become corrupted.TreeLayouterandGenericTreeLayouter: Fixed possibleNullReferenceExceptionfor trees with empty group nodes.ShuffleLayouter: Fixed bug that may cause small offsets of fixed nodes.Polyline.EdgeRouter: Fixed bug in calculation of edge to edge distance penalties which could reduce the space where edges can be routed causing them to take unnecessary long routes.Polyline.EdgeRouter: Fixed bug that caused edges that connect a node with an ancestor group node to violate the minimal node to edge distance for the target node.Polyline.EdgeRouter: Fixed bug that caused edges that connect a node with an ancestor group node to have unnecessary long and bended edge paths when using port constraints.Polyline.EdgeRouter: Fixed bug that caused edges that connect a node with an ancestor group node to cross their source nodes when using port constraints.Polyline.EdgeRouter: Fixed bug that makes it possible to group the source of one edge and the target of another edge at their common node.Polyline.EdgeRouter: Fixed bug that sometimes causes superfluous edge overlaps.Polyline.EdgeRouter: Fixed bug that caused minimum distance violation of grouped edges.Polyline.EdgeRouter: Fixed rareNullReferenceExceptionwhile calculating edge crossing costs.Polyline.EdgeRouter: Fixed bug that sometimes assumed wrong label bounds for labels of table nodes. This could result in too many bends for edges that were routed around those wrong boxes. Labels of table nodes are now ignored by the router ifTableLayoutConfiguratoris used to prepare the graph for layout calculations.Polyline.EdgeRouter: Fixed bug that sometimes assumed wrong label bounds if the router was used directly after another layout algorithm. This could result in too many bends for edges that were routed around those wrong boxes and/or edges crossing labels because the actual label boxes were ignored.PolylineLayoutStage: Fixed possibleIndexOutOfRangeExceptionif there are fixed edges with a single, very short segment.BusRouter: Fixed clean up of bends that resulted in unnecessary detours in edge paths.BusRouter: Fixed possibleIndexOutOfRangeException.BusRouter: Fixed possibleInvalidOperationExceptioncaused by non-orthogonal edge segments.BusRouter: Fixed possibleNullReferenceExceptionwhen routing only a subset of edges without adding aDataProviderto the graph that marks edges as selected.IncrementalHierarchicLayouter: Fixed bug that could result in infinite y-coordinates when octilinear edge routing was enabled.Polyline.EdgeRouter: Fixed bug that may cause anArgumentExceptionif a grid is specified (see optionGrid).OrthogonalGroupLayouter: Fixed bug that may cause wrong group bounds calculation if a group node label lies outside of the group node.PartialLayouter: Fixed possibleNullReferenceExceptionif the algorithm is applied to a graph with partition grid (seePartitionGrid).
Demos
ImageExportDemo: The hit test for the export rectangle was configured incorrectly.
yFiles WPF 2.4.0.3 - Changes Since 2.4.0.2
Improvement
LayoutGraphAdapterprovides now the originalTagdata for temporary graph objects.
Bugfixes
- Undoing a reparent grouping gesture might have resulted in inconsistent group node sizes. Note: The fix results in a slightly incompatible behavior when nodes are reparented programmatically and multiple folding views are used. In that case, you need now to subscribe to hierarchy events and manually adjust the group node bounds.
- The default value of
AbstractTableNodeStyle#BackgroundStylewas not serializable. - Manually bracketing undo edits with
BeginEditandEndEditmight have led to exceptions when folding was active.
Automatic Layout
DirectedOrthogonalLayoutercould throw aString.IndexOfexception.IncrementalHierarchicLayouter: Fixed a rare bug that caused broken edge routes if edges are routed polyline.
yFiles WPF 2.4.0.2 - Changes Since 2.4.0.1
Bugfixes
ClickInputMode.SwallowFocusClickhad only an effect for the very first click.- Copying table stripes did not work correctly.
- GraphML: Properties with a text value containing nested
CDATAsections were not parsed correctly. - Fixed problems with invalid license popups in Visual Studio Designer. Note that
GraphControlmay still show an erroneous watermark in design view. - Moving the viewport by clicking into the
GraphOverviewControldid not honorCanvasControl.ViewportLimiterrestrictions. RotatedSliderEdgeLabelModelcan now deal with edge paths that arenull, e.g. when usingVoidEdgeStyle.- GraphML: Primitive types like floats and doubles could not be read when used in element syntax and the current
CultureInfowas notInvariant.
Automatic Layout
EdgeRouter: Fixed bug that may cause anArgumentExceptionif a grid is specified (see propertyGrid).OrthogonalGroupLayouter: Fixed bug that may cause a wrong group bounds calculation if a group node label lies outside of the group node.PartialLayouter: Fixed possibleNullReferenceExceptionif the partial layouter is applied to a graph with partition grid (seePartitionGrid).PartialLayouter: Fixed bug that may cause a very long runtime if the algorithm considers node alignment (see propertyConsiderNodeAlignment).IncrementalHierarchicLayouter: Fixed bug that may cause broken edge routes for edges with port candidates if backloop routing is enabled (see propertyBackloopRouting).ParallelEdgeLayouter: FixedNullReferenceExceptionthat appears if the leading edge has zero length.ParallelEdgeLayouter: Fixed bug that may cause points withDouble.NaN-coordinates for some edges.LayoutTool: Fixed bug in methodRouteEdgesParallel: that may cause points withDouble.NaN-coordinates for some edges.EdgeRouter: Fixed performance problems for graphs with overlapping fixed edges.
yFiles WPF 2.4.0.1 - Changes Since 2.4
Improvements
Automatic Layout
Trees: Added methodIsForest(Graph, bool).
Bugfixes
NavigationInputMode.ToggleGroupNodeStatedid not expand collapsed folder nodes.NavigationInputMode: MethodsCollapseSelectionandExpandSelectionthrew aNullReferenceException.SimpleAbstractLabelStyle.IsInBoxalways returned false.GraphEditorInputMode: TheItemLeftDoubleClickedandItemRightDoubleClickedevents were never raised.NodeStyleLabelStyleAdapter: Fixed rendering bug when the style was used for node labels.
Automatic Layout
Rectangle2D.Intersectssometimes returnedtruefor non-intersecting rectangles. This could cause infinite loops inBusRouter.IncrementalHierarchicLayouter: Fixed bug that caused violation of strong port constraints of typeAnySidefor backloop edges.RecursiveGroupLayouter: FixedIllegalStateExceptionthat may appear if there are edges that start/end at group nodes.BusRouter: Fixed bug that may cause a broken bus structure.BusRouter: Fixed possible stack overflow.IncrementalHierarchicLayouter: Fixed bug that caused unsuitable edge routes for grouped edges within group nodes.OrthogonalLayouter: Fixed exception that may appear for graphs with nodes of high degree.
yFiles WPF 2.4 - Changes Since 2.3.0.4
Major Features Added
Automatic Layout
- Class
yWorks.yFiles.Layout.Router.Polyline.EdgeRouteris a new edge routing algorithm that creates polyline edge routes. The segments of an edge are either orthogonal or octilinear, that means, the slope of each segment is a multiple of 90 degrees or a multiple of 45 degrees, respectively.
[To the corresponding section in the yFiles WPF Developer's Guide...] yWorks.yFiles.Layout.Router.Polyline.PolylineLayoutStage: A new layout stage that adds polyline segments to the orthogonal edge paths of a graph.IncrementalHierarchicLayouter: Added support for octilinear edge routing, i.e., a routing style where the slope of each edge segment is a multiple of 45 degrees. Different edge routing styles can be specified using classyWorks.yFiles.Layout.Hierarchic.Incremental.RoutingStyle.yWorks.yFiles.Layout.PreferredPlacementDescriptor: A new descriptor that allows to specify advanced preferred placement information for edge labels.
[To the corresponding section in the yFiles WPF Developer's Guide...]
Minor Features Added
ClickInputMode,GraphEditorInputMode,GraphViewerInputMode: New events forLeftClicked,RightClicked,LeftDoubleClickedandRightDoubleClicked. Also,ClickInputModehas been improved to handle multiple mouse buttons concurrently.MainInputModeandGraphViewerInputMode: Added new bulk selection eventsMultiSelectionStartedandMultiSelectionFinished.LayoutExecutorcan now safely handle concurrent layout requests. By default an already running layout will be short-cut and the next layout request will be processed. PropertySequentialExecutioncan be set tofalseto revert to the old (unsafe) behavior. The newStopmethod and theIsRunningproperty can also be used in this context.NodeControlNodeStyleandLabelControlLabelStylenow have the ability to automatically trigger a resize of their corresponding graph items whenever the desired size of the control contents change, e.g. in response to a dynamic UI.- New classes
NodeStyleDecorationInstaller,EdgeStyleDecorationInstaller, andLabelStyleDecorationInstallerallow the use of a node, edge, or label style to render the selection, highlight, or focus indicator of nodes, edges, and labels, respectively.
Automatic Layout
BalloonLayouter: New option to take into account the bounds of node labels when calculating a layout.LabelLayoutTranslator: Added optionAutoFlippingEnabledto specify whether or not edge labels should be automatically flipped if they would be upside-down.AbstractLabelingAlgorithm: Added optionAutoFlippingEnabledto specify whether or not edge labels associated with a "free" label model should be automatically flipped if they would be upside-down.
Improvements
- Optionally,
LayoutExecutorusesWaitInputModewhile waiting during the calculation of a layout. - Added callback method
SetEdgePortLocationtoLayoutGraphAdapterthat is called while assigning a new location to a port that is owned by an edge. - Changing the event recognizers of an
IInputModeafter the mode has been installed has now an effect in all input modes. - Improved performance of table rendering and interaction.
- Refactored
MoveLabelInputModeto make customizations easier. The moved label is now accessible and various new protected methods provide fine-grained control of the behavior. MoveLabelInputModenow takes the position handler from the lookup of a label if one is present, and creates a new one only if none was found.- Custom context menus declared on controls that are rendered within the
CanvasControlnow play well withContextMenuInputMode. The newSuppressChildMenusproperty can be used to optionally prevent those menus from appearing if the mode is not enabled. IClipboardHelper: The predicate functionsShouldCutandShouldCopywere not used for the default cut and copy operations provided byGraphEditorInputModeandGraphControl.- Child input modes of
GraphViewerInputModecan now be changed similar toGraphEditorInputMode. - Added explicit extension method
IGraph.CreateNode(PointD,INodeStyle). Arrow: Setting the various properties now only recreates the arrow template if something actually changed.ContextConfigurator.Setup: TheIRenderContextreturned by this method now has the correctClipapplied.
Automatic Layout
OrthogonalGroupLayoutersupports labels at edges incident to group nodes.IncrementalHierarchicLayouternow treats edge groups at empty group nodes like those on regular nodes instead of ignoring them like it is done for non-empty group nodes.WeightedLayerer: Improved quality by reducing the number of reversed edges ifWeightedCycleRemovalis enabled.PartialLayouternow considers edge ports when calculating the barycenter of a component (if its propertyPositioningStrategyis set toSubgraphPositioningStrategy.Barycenter).PartialLayouter: Reduced cases where the result contains overlapping node elements.PartialLayoutercalculates improved routing if optionRouteInterEdgesImmediatelyis enabled and generally for edges between fixed elements.SmartOrganicLayouter: Fixed nodes are no longer moved by a fixed offset if scope is set toScope.Subset.GenericTreeLayoutercreates more compact layouts, especially for trees with edge labels.- Added the ability to
DefaultNodePlacerto create polyline-style edge routings with sloped edge segments. - Added the ability to
DefaultPortAssignmentto distribute edges at the border of the nodes. RecursiveGroupLayouter: Improved performance for graphs with a mainly flat structure.GraphLayoutLineWrapper: Improved edge routing for overlapping edges, for example grouped edges.- Added auto-flipping to
RotatedDiscreteEdgeLabelLayoutModelandRotatedSliderEdgeLabelLayoutModel. Labels that are placed upside down by a layouter will be flipped. - Improved the performance of
PortCandidatewhich potentially improves the performance of theIncrementalHierarchicLayouterwith rotated graphs with PortCandidates. - Optimized number of generated
PortCandidates inRecursiveGroupLayouterfor the core layouter. GraphConnectivity: Improved methodMakeBiconnectedto work with graphs with self-loops (i.e. edges whose source and target nodes are the same).
Demos
- Added new demo
Demo.yFiles.Graph.Input.HandleProviderthat shows how to add resize handles to graph elements that don't provide them out of the box. - Added new demo
Demo.yFiles.Graph.Input.SingleSelectionthat shows how to configureGraphEditorInputModeto enable single selection mode for interaction. - Added new demo
Demo.yFiles.Graph.StyleDecoratorsand a corresponding step in the Custom Style Tutorial that shows how to correctly implement the decorator pattern for node styles. - Added new demo
Demo.yFiles.Graph.SelectionStylingthat shows how to use node, edge and label styles for the painting of the selection decorator. - Added new demo
Demo.yFiles.Layout.PreferredLabelPlacementthat shows how to use the newPreferredPlacementDescriptorlayout feature. - The layout modules now use the new preferred placement descriptor feature for label setup. Additionally, the previous label setup had no effect at all due to an erroneous configuration.
- Prevent negative edge weights in
Demo.yFiles.Algorithms.ShortestPathsince cycles with negative weights are not allowed by the algorithm.
Bugfixes
- If
NavigationInputModewas used as child ofGraphViewerInputModeorGraphEditorInputMode, it didn't respect the selectable and focusable items of its parent input mode. - In
CreateEdgeInputModeandMoveInputMode, snapping may not have been re-enabled after disabling it temporarily. - Prevent a very rare bug caused by the preferred size calculation of labels of dummy elements of grouped graphs when
LabelControlLabelStylewas used. IconLabelStyle: Fixed exception when the icon size was not set or was empty.GraphClipboard.Cut: The filter predicate was evaluated twice, resulting in unexpected behavior if the predicate evaluation depended on state that could change by removing graph elements.HorizontalScrollBarPolicyandVerticalScrollBarPolicyinCanvasControlcould not be set to different values at the same time. The value of the latter was used effectively, always.LabelControlLabelStyleincorrectly triggered an update of the preferred label size calculation in folded graph scenarios under certain conditions.- An error in
CanvasPrintDocumentprevented XPS printing to certain paper sizes. - In
CreateEdgeInputMode, the compound undo unit is cancelled if the edge creation is implicitly cancelled. The old behavior can be restored by disablingCreateEdgeInputMode.CancelEditImplicitly. MoveInputModeonly considers hovers without modifiers as valid to prevent "cursor fight" withMoveViewportInputMode.
Automatic Layout
IncrementalHierarchicLayouter: Fixed incorrect handling of port candidates in layouts where rotation and a mirror was set.IncrementalHierarchicLayouter: Fixed integer overflow when group compaction is activated while layouting extremely large, deeply nested graphs.IncrementalHierarchicLayouter: Fixed port handling of edges with a single edge port candidate that is contained in a set of node port candidates.- Fixed bug with invalid array access in
AspectRatioComponentLayerer. - Fixed bad edge routings in
FamilyTreeLayouterwhen there are several marriages between generations. IsolatedGroupComponentLayouternow considers labels in group bounds calculation if label awareness is enabled.PartialLayouter: Fixed IndexOutOfRangeException that sometimes appears for large graphs.GroupNodeRouterStage: Fixed possible exception that was caused by the missing removal of a temporarily added DataProvider.OrthogonalLayouterandDirectedOrthogonalLayouter: Fixed bug that caused an ArgumentException if input graph contains overlapping parallel edges and from sketch mode is enabled (see propertyUseSketchDrawing).OrthogonalEdgeRouter: Fixed exception that may appear when both optionsReroutingandLocalCrossingMinimizationare enabled.RotatedSliderEdgeLabelLayoutModelandSliderEdgeLabelLayoutModel: Improved label placement at zero-length edge segments.GraphTransformer: Fixed group nodes bounds after transforming a sub-graph only.ParallelEdgeLayouter: FixedNullReferenceExceptionwhich may appear when source/target points of parallel edges are outside of the corresponding node.SmartOrganicLayouter: Fixed problem that sometimes caused very long runtime for simple grouped graphs.SmartOrganicLayouter: Fixed wrong calculation of group node sizes if optionConsiderNodeLabelsis enabled.YVector: Fixed methodRotate(double)to no longer return vertically mirrored results.
Changes in Default Behavior
IClipboardHelper: The predicate functionsShouldCutandShouldCopyare now taken into account for the default cut and copy operations provided byGraphEditorInputModeandGraphControl.ContextConfigurator.Setup: TheIRenderContextreturned by this method now has a finiteClipapplied.- Concurrently executing layouts using
LayoutExecutorwill now result in the subsequent executions waiting for the previous execution to finish. PropertySequentialExecutioncan be set tofalseto revert to the old (unsafe) behavior. - The
ContextMenuInputMode'sPopulateItemContextMenuevent will not fire anymore for context menus that are declared in controls inside the CanvasControl, but only for the menu that is managed by the input mode. - If the
PopulateContextMenuEventArgs' propertyShowMenuis set to true, now even empty menus will be displayed.
Automatic Layout
PartialLayouter: PropertyEdgeRoutingStrategynow disables a previously set customized edge router.
Incompatible API Changes
Automatic Layout
IEdgeLabelLayout: Removed propertyPreferredPlacementand added propertyPreferredPlacementDescriptor.PartialLayouter: Replaced methodConfigureOrthogonalEdgeRouterby methodConfigureEdgeRouter.- Classes
yWorks.yFiles.Util.ISortedMapandyWorks.yFiles.Util.ISortedSethave been removed from the public API. These interface were never meant to be used by customers.
yFiles WPF 2.3.0.4 - Changes Since 2.3.0.3
Bugfixes
GraphSource: If an edge item is removed fromEdgesSource, nodes connected to this edge are no longer removed. This only occurred ifDynamicUpdateswas enabled andLazyNodeDefinitionwas set tofalse.CanvasControl.Print(RectD, bool, bool, InsetsD?)threw aFieldAccessExceptionwhen theshowPrintDialogparameter was false and/or theshowPreviewwas true.CanvasPrintDocument.Print(PrintDialog, bool, bool, InsetsD, string)threw aFieldAccessExceptionwhen the both theshowPrintDialogparameter and theshowPreviewparameters were true.CanvasPrintDocument.ShowPrintPreviewandCanvasPrintDocument.Print(PrintDialog, bool, bool, InsetsD, string): Documentation for the second parameter (originally calledshowPrintDialog) was wrong: the printer setting dialog is actually shown if the parameter is set tofalse, and only ifshowPreviewis alsotrue. This has been fixed.
Demos
Demo.yFiles.Printing: The "Print" button did not do anything.
yFiles WPF 2.3.0.3 - Changes Since 2.3.0.2
Bugfixes
ContextConfigurator: Left and top margins were not taken into account correctly.XamlSerializer: Fixed potential exceptions that could occur with properties that are not serializable.- The default edge style used by the
GraphSourcewas different from the one used in yFiles WPF 2.2. This has been reverted. yWorks.yFiles.UI.Drawing.TableRenderingOrderwas not excluded from obfuscation.- The
IGraphinstance returned byGraphSource.Graphwas not obfuscated correctly, thus preventing binding to its properties. - The
IGraphinstance returned byGraphSource.Graphthrew an exception when callingSetStyle(IEdge, IEdgeStyle). Matrix2D.Scale(double,double,MatrixOrder)did not work correctly forMatrixOrder.Append.PointDandGeneralPath: Hit and equality tests that specify an option epsilon value now include the epsilon into the valid range.
Demos
Demo.yFiles.ImageExport: Insets were not assigned correctly.
yFiles WPF 2.3.0.2 - Changes Since 2.3.0.1
Bugfixes
- GraphML data for edges was not read anymore. This has been fixed.
yFiles WPF 2.3.0.1 - Changes Since 2.3
Improvements
- The
LayoutGraphPanelin the algorithm demos now correctly displays the locations of labels. - The animation for bends has been slightly improved in the case where new bends are added during layout morphing.
Demos
- The
InteractiveNodesGraphSourcedemo now shows how to drag a node from the graph to one of the successor/predecessor panels.
Bugfixes
- Due to a bug in
UIElementExtensions.SetPen, some of the styles that were using pens could trigger an exception when a pen without a dash and later on a dashed pen was assigned. - Fixed
DefaultGraph.Remove(IPort)not working correctly in certain cases when there were edge-to-edge connections. This also affected the 'cut' clipboard operation in the same scenarios. InteractiveOrganicLayouter'sSyncStructurewas broken and blocking forever causing the interactive organic demo to halt on graph modifications.AdjacentNodesGraphSourcenow correctly keeps self-loops if they were defined both through predecessor and successor references in the same node and only one of the items is removed.
Demos
- Fixed the 'nesting' graph in
Demo.yFiles.Graph.Viewer - Fixed broken usage of
IncrementalHierarchicLayouter.LayerValueHolderDpKeyinDemo.yFiles.Layout.IncrementalHierarchicLayouterby removing classNodeIntValueHolderand using thelayerMapperdirectly. (Also see the updated Incompatible Changes section for 2.3) - Fixed
Demo.yFiles.Layout.InteractiveOrganicfreezing when the graph was modified structurally.
yFiles WPF 2.3 - Changes Since 2.2.0.4
Framework Requirements
- yFiles WPF now requires the .NET 4.0 framework (Client Profile) or higher at runtime.
Major Features Added
- Touch input is now supported by all built-in input modes. New input mode class
TapInputModeintroduces transparent support for touch gestures in user interactions. This new input mode is part of the default configurations of GraphEditorInputMode and GraphViewerInputMode, respectively. - New support for edge-to-edge connections in user interactions. Edges can be connected to other edges during edge creation as well as by reconnecting edge ends.
[To the corresponding section in the yFiles WPF Developer's Guide...] - A great number of additional status-indicating events has been added to the various default input modes in order to provide fine-grained callbacks to customization code.
- The library no longer contains Apache licensed third party code.
Automatic Layout
- Class
yWorks.yFiles.Layout.Multipage.MultiPageLayouteris a new layout algorithm that breaks apart a given graph into a set of smaller graphs so that each layout of a small graph fits into a given width and height.
TheDemo.yFiles.Layout.MultiPageshows how to use classMultiPageLayouterto sub-divide large graphs into smaller bits of navigable information.
[To the corresponding section in the yFiles WPF Developer's Guide...]
Minor Features Added
- New classes
AdjacentNodesGraphSourceandAdjacentEdgesGraphSourceprovide data binding support for a much larger number of user data models. DefaultEdgeIntersectionCalculatornow supports cropping edges directly at the port instead of at the node's geometry. This can be used to easily have edges end at the port instead of at the geometry of the node. See the new propertiesCropAtPort,ExtraCropLength, and callback methodGetPortGeometry.GraphSource:- Added property
LazyNodeDefinitionwhich allows the usage of objects as source and target of edges that are not part of NodesSource. - Added the binding properties
LocationXBindingandLocationYBindingfor specifying the node location. - Added the binding property
NodeIdBindingfor specifying the node id. This allows specifying the source and target node of an edge using the node id.
- Added property
TreeSource: Added the bindingsLocationXBindingandLocationYBindingfor specifying the node location.
Automatic Layout and Analysis
- The orthogonal layout algorithms
OrthogonalLayouter,OrthogonalGroupLayouter, andDirectedOrthogonalLayouternow support specifying a minimum first/last segment length. See the corresponding descriptions ofOrthogonalLayouter.EdgeLayoutDescriptorDpKey,OrthogonalGroupLayouter.EdgeLayoutDescriptorDpKey, andDirectedOrthogonalLayouter.EdgeLayoutDescriptorDpKey, respectively. SimplexNodePlacer: Added an algorithm that reduces the number of bends. This option can be set using propertyBendReductionEnabledand is enabled by default. Note: using this option increases the runtime of theIncrementalHierarchicLayouter. If the runtime exceeds the maximal duration the number of bends is not reduced.- Added abstract class
AbstractPortConstraintOptimizer, a partial implementation of interfaceIPortConstraintOptimizer, to minimize the effort required to modify the port assignment after the sequencing phase of a hierarchic layout. TreeLayouter: When using port stylesBorderCenterandBorderDistributedtogether with child placement policiesLeavesStacked,LeavesStackedLeft,LeavesStackedRight, andLeavesStackedLeftAndRightedges connect to the appropriate sides of their target nodes instead of to the top. Moreover, the order of outgoing edges no longer results in crossings for port styleBorderDistributed.AbstractLabelingAlgorithm: Added DataProvider keyLabelModelDpKeythat can be used to temporarily specify the model of labels that is used by the labeling algorithm.ShortestPaths: Added methodShortestPair.
Improvements
ContextMenuInputMode: Added propertyCaptureMouseClicksthat prevents other input modes from receiving mouse clicks while the context menu is open.GraphMLIOHandler: AddedAddRegistryOutputMapperoverload that takes a serialization handler.
Automatic Layout
FamilyTreeLayouter: Improved the algorithm with respect to the number of edge crossings.PCListOptimizer: Improved the handling of port candidates and enhanced backloop routing support.
Demos
- Added new demos
Demo.yFiles.DataBinding.InteractiveNodesGraphSourceandDemo.yFiles.DataBinding.InteractiveEdgesGraphSourcethat show data binding with classesAdjacentNodesGraphSourceandAdjacentEdgesGraphSource, respectively. - Added new demo
Demo.yFiles.Graph.EdgeToEdgethat shows how to enable and make use of the new edge-to-edge connection feature. - Added new
Demo.yFiles.Layout.Multipagethat shows how to use classMultiPageLayouterto sub-divide large graphs into smaller bits of navigable information.
Bugfixes
Automatic Layout
LabelLayoutDataRefinement: Fixed InvalidCastException that could occur due to wrong type of label model parameters.
Incompatible API Changes
- yFiles WPF now requires at least the .NET 4.0 framework.
- Methods
GetTargetPortCandidateProviderandGetSourcePortCandidateProviderinGraphEditorInputModechanged their signatures to acceptIPortOwnerinstances instead ofINodeinstances. This was required to allow for interactive edge-to-edge connections. Overriding methods need to be adjusted accordingly. - Method
ShowHitNodeCandidatesOnlyin classPortRelocationHandlehas been renamed toShowHitPortOwnerCandidatesOnlyto support edge-to-edge connections. Also the behavior of this class has been changed to allow edge-to-edge connections if this feature has been enabled by providing port candidates at the edges. Should you wish to disallow edge-to-edge connection even though you are providing edge port candidates, the newEdgeToEdgeConnectionsAllowedproperty can be set tofalse. - Previously it was possible to cast
DefaultEdgeIntersectionCalculator.Instanceto the containing type. The singleton is not of the given type anymore. If you require an instance of that type, consider instantiating one instead. - Since with this release
LayoutGraphAdaptertranslatesIMapperinstances in the graph's mapper registry asIDataMapimplementations that enable data write-back scenarios, the code that deals withIncrementalHierarchicLayouter.LayerValueHolderDpKeynow behaves differently. In older releases theIIntValueHolderinterface was queried from the mapper to write back the layer data. Now the data is written directly into the mapper and theIIntValueHolderimplementation is ignored.
yFiles WPF 2.2.0.4 - Changes Since 2.2.0.3
Bugfixes
- Fixed licensing error that occurred on FIPS enabled systems.
- Setting
GraphOverviewControl.GraphPaintablehad no effect. - Deleting graph elements during interactive edge creation could throw an exception.
- Group node visualizations were not always removed correctly when the group node was deleted.
DefaultSelectionModelwas not always cleaned up correctly when the domain was changed.SliderEdgeLabelModelthrew an exception for paths with zero length segments.FilteredGraphWrapper: The adjacency state of the filtered instance was wrong under certain conditions.FreeEdgeLabelModel: Fixed bad positions returned by parameter finder.- Convenience class
LabelDecoratorwas unusable because of a wrong type parameter.
yFiles WPF 2.2.0.3 - Changes Since 2.2.0.2
Bugfixes
LayoutGraphAdapterdid not honor mapper in the registry registered under theLayoutGraphAdapter.EdgeLabelLayoutPreferredPlacementDpKeykey.BendAnchoredPortLocationModelcould throw an IndexOutOfRangeException under certain circumstances.AbstractTableNodeStyledid not provide the table to the background style.- Sharing objects in GraphML did not work in some cases when these objects were written through a markup extension.
CreateEdgeInputModedid not highlight the closest target port candidate during the edge creation gesture.DropInputMode#AdjustEffects: Setting a customValidHitTestablehad no effect.DropInputMode: The mode did not exit cleany under some rare circumstances.- Fixed an issue with custom license files that were valid for a specific version, only
- Fixed
IconLabelStyleconstructor not assigning icon size. TableEditorInputMode#EditLabeldid not work.- Child modes of a
MultiplexingInputModewere not always disabled together with the parent mode.
Automatic Layout and Analysis
yWorks.yFiles.Algorithms.Groups: Fixed possible NRE when calculating BCC for a graph containing self-loops in methodBiconnectedComponentGrouping(Graph, INodeMap).yWorks.yFiles.Algorithms.ShortestPaths: Fixed an error in methodFindShortestUniformPaths(Graph,INodeMap,IDataProvider,bool,int,EdgeList,NodeList). In many cases, nodes and edges which did not belong to a shortest path were added to the result nevertheless.yWorks.yFiles.Algorithms.GraphConnectivity: Fixed methods that calculate biconnected components to mark selfloops as not belonging to any biconnected component.yWorks.yFiles.Algorithms.Cycles: MethodFindAllCycleEdges(Graph, bool)has been improved to return only edges that belong to at least one simple cycle. Previously, all edges were returned for the undirected case.
Improvements
- Improved license handling for cases where the .NET license manager mechanism is not fully functional.
yFiles WPF 2.2.0.2 - Changes Since 2.2.0.1
Bugfixes
ControlStyleBase.StyleTagwas not excluded from obfuscation.- Some table related classes were not excluded from obfuscation.
- Fixed exception in
LayoutExecutorwhen animation and grouping were both disabled. - Fixed potential memory leaks in
TableLayoutConfiguratorwhen exceptions occurred. yWorks.yFiles.Algorithms.Groups.EdgeBetweennessClustering: The parametersminGroupCountandmaxGroupCounthad no effect.
Automatic Layout
LayoutExecutordid not provide the GraphControl's selection to the layout engine.- Fixed
NullReferenceExceptioninPartitionGridLayoutStageif no partition cells were assigned to any nodes. - Fixed Exception that was triggered when using a generic labeling algorithm (i.e. a subclass of
yWorks.yFiles.Layout.Labeling.AbstractLabelingAlgorithm) together with layout stageyWorks.yFiles.Layout.LabelLayoutDataRefinement.
yFiles WPF 2.2.0.1 - Changes Since 2.2
Bugfixes
TableExtensions.RemoveWithResizealways resized the last sibling instead of the neighbor.- The
LabelDefaults.AutoAdjustPreferredSizewas ignored for stripe labels. TableEditorInputMode.TextEditorInputModewas used even when the TableEditorInputMode had been installed as child mode ofGraphEditorInputMode.TableEditorInputMode.DeleteSelection: Items were not always deleted in bottom to top order, leading to unpredictable resize results.TableLayoutConfiguratorused wrong bottom insets for the last column.TableLayoutConfiguratordid not correctly restore the mapper for partition cells that had been set explicitly.DefaultStripeInputVisualizationHelperwas not excluded from obfuscation.- Broken
AbstractTableNodeStyleimplementation resulted in defunct visuals if used in multiple CanvasControls and after export operations. NodeDropInputModedid not transfer focus to the graph control after a node had been dropped.- The
TagofIStripes in the default table implementation was not serialized and deserialized from and to GraphML. To get back that old behavior, set the newSerializationProperties.DisableStripeUserTagsproperty totrue. - The
GraphClipboarddid not always copy all state of items that were invisible in a folded graph view. - Dropping columns and rows into a table accidentally resized the parent stripe to values that are too small for the contents.
- For some configurations,
TableLayoutConfiguratorcould not properly deal with non-empty group nodes inside table nodes. - Fixed a bug that caused the
GraphCommands.CollapseGroupCommandandGraphCommands.ToggleGroupStateCommandto fail in case of certain multi-node selections.
Automatic Layout
EdgeGroupRouterStage: Edges that had both source and target group IDs were not grouped at all.
yFiles WPF 2.2 - Changes Since 2.1.1
Major Features Added
New Comprehensive Support for Swimlane Diagrams
- New model class
yWorks.yFiles.UI.Model.Tableprovides extensive support for tabular presentation of subgraphs which is well suited for the visual presentation of swimlane layouts.
Flexible visualization for table elements by means of existing node styles is provided by implementations of theyWorks.yFiles.UI.Drawing.ITableNodeStyleinterface.
[To the corresponding section in the yFiles WPF Developer's Guide...] - New dedicated InputMode
yWorks.yFiles.UI.Input.TableEditorInputModewhich can be used either standalone or as a child mode ofyWorks.yFiles.UI.Input.GraphEditorInputModeand which provides support for user interaction specific to the tabular data representation of an associated node.
[To the corresponding section in the yFiles WPF Developer's Guide...] - New support class
TableLayoutConfiguratorcan automatically create a suitable partition grid setup from existing table structures in a graph. Also,LayoutExecutorhas been enhanced to optionally configure table specific layout features. [To the corresponding section in the yFiles WPF Developer's Guide...] - The
Demo.yFiles.Graph.TableEditordemo demonstrates the capabilities of table visualization editing, as well as automatic layout of swimlane diagrams.
Visual enhancements
- Added new edge label models
RotatedSliderEdgeLabelModelandRotatedSideSliderEdgeLabelModelwhich allow placement of rotated labels on a continuous set of positions along both sides of an edge or directly on the edge path.
Automatic Layout
- New support for rotated labels (e.g. using the new
RotatedSliderEdgeLabelModelorRotatedSideSliderEdgeLabelModel) in the yFiles generic labeling algorithms. PartialLayouter: A new layout algorithm for partial layouts. This layout algorithm changes the coordinates for a given set of graph elements (called partial elements). The location or size of the remaining elements (called fixed elements) is not allowed to change. The layout algorithm aims to place the partial elements such that the resulting drawing (including the fixed elements) has a good quality with respect to common graph drawing aesthetics.PartialLayoutModulerepresents an interactive configurator and launcher for this layout algorithm.BusRouter: A new orthogonal bus-style edge routing algorithm. This algorithm combines the large number of edges of complete subgraphs in a concise, tree-like structure that consists only of vertical and horizontal line segments. The positions of the nodes in a graph are not altered by this algorithm.BusRouterModulerepresents an interactive configurator and launcher for this layout algorithm.OrthogonalEdgeRouter: Added support for monotonic path restrictions. Such restrictions specify that edges should be routed monotonically in vertical and/or horizontal direction. The restrictions can be set using theMonotonicPathRestrictionproperty.IncrementalHierarchicLayouter: Added data provider keyCriticalEdgeDpKeythat allows to specify a priority value for edges that are part of critical paths. The layouter tries to vertically align each node pair that is connected by such a "critical" edge (an edge that has a non-zero, positive priority value). Conflicts between different critical edges are resolved in favor of the higher priority.SimplexNodePlacer: Added optionStraightenEdgeswhich allows to specify whether or not a postprocessing step should be applied that tries to remove some bends. Enabling this option may violate some minimum distances specified by the user.OrthogonalEdgeRouter: Added support forPortCandidateSets that allow to specify the available port candidates at a node.
Minor Features Added
CanvasControlnow offers a method that yields theVisualfor a givenICanvasObject. This can be leveraged by UI testing tools.- New class
NodeStylePortStyleAdaptercan be used to reuse existingINodeStyleimplementations for port visualization.
Automatic Layout
- New layout stage class
PartitionGridRouterStageenablesOrthogonalEdgeRouterto properly route edges within a partition grid. RecursiveGroupLayouter: Added data provider keyGroupNodeLayouterDpKeythat allows an easier way to specify the layout algorithm used for recursive group nodes. Furthermore, it allows to specify non-recursive group nodes, i.e., group nodes whose contents are laid out using theILayouterinstance specified by the nearest predecessor of the group node (with respect to the grouping hierarchy) which is associated with an ILayouter.TreeLayouter: Added new support for child placement policies that can be used to achieve more compact tree layouts. SeeChildPlacementPolicy.TreeLayouter: Added new global layering option that ensures that large nodes never span more than their layer. SeeEnforceGlobalLayering.OrthogonalEdgeRouter: Added support for considering node labels, seeConsiderNodeLabels.CircularLayouter: Added data provider keyCircleIdHolderDpKeythat allows to obtain a mapping between nodes and the corresponding circle IDs.OrthogonalEdgeRouter: Added new routing styleRoutingStyle.Balancedwhich is based on the existingRoutingStyle.Prefermiddlebut draws segments between bends of the same direction (U-style turns) the short way.
Improvements
DropInputModehas been improved to capture the start of a drag enter gesture in cases where the drop target that is hit first would also accept the drag enter event.- All built in node styles have been modified to allow the CanvasControl to accept drop enter events even if they are hit first.
- License failures in the algorithms assembly are reported more prominently when used through
LayoutExecutorand related convenience methods. WaitInputModeis automatically enabled while file I/O commands are executed.GraphEditorInputMode.DeleteSelectionnow doesn't create an empty Undo edit if nothing would be deleted at all.CreateEdgeInputMode:UpdateEdgeStyleis now called after the source port candidate has been determined.Mouse2DEventTypesnow also includes the case where mouse capture is lost. All existing input modes have been improved to take advantage of this event, where appropriate.
Automatic Layout
LayoutExtensions: Added and improved convenience methods that deal with sequence and layer constraints.IncrementalHierarchicLayouter: Enhanced support for fixed nodes.GroupNodeHider: Several layout algorithms (all tree layouters, circular, all orthogonal layouters, random, the fixed group layout stage) assigned relatively small dimensions to empty group nodes. Some of them also moved these nodes to (0,0). None of these layout algorithms treats groups directly, instead they use the group node hider. The group node hider now optionally does not hide empty groups (HidingEmptyGroupNodes) enabling that these can be treated like normal nodes. This option is now used where appropriate. Note that some layout algorithms may still shrink empty group nodes depending on the particular choice of parameters, e.g., orthogonal layout with uniform node sizes.OrientationLayouter: Node insets as well as port constraints are now also translated correctly for each possible orientation.
Demos
- Added new
Demo.yFiles.Layout.MixedLayoutdemo that shows how to recursively apply different layout algorithms to the contents of group nodes. - Added new
Demo.yFiles.Layout.PartialLayoutdemo that presents specific setup of the new partial layout support in conjunction with Circular, Hierarchic, Organic, and Orthogonal Layout. - The new
Demo.yFiles.Layout.LayerConstraintsdemo shows how to use layer constraints with the IncrementalHierarchicLayouter to restrict the node layering. - The new
Demo.yFiles.Layout.SequenceConstraintsdemo shows how to use sequence constraints with the IncrementalHierarchicLayouter to restrict the node sequencing. - The new
Demo.yFiles.Layout.PortCandidatedemo shows how PortCandidateSets can be used with IncrementalHierarchicLayouter to control from what side edges connect to certain node types in the automatic layout process.
It also show-cases a custom node style that displays simple flowchart symbols and integrated port candidate visualization. - Added new
Demo.yFiles.Layout.LogicGatedemo that shows how to apply fixed PortConstraints to a layout and how to use PortCandidates for interactive edge creation (via IPortCandidateProvider).
It also show-cases a custom node style that displays logic gate symbols. - Added new
Demo.yFiles.Layout.GenericTreedemo that shows the effects of different NodePlacer implementations on a node and its subtree(s) in a tree layout calculated by GenericTreeLayouter. - The new
Demo.yFiles.Layout.EdgeLabelingDemoshows how to configure different edge label models as well as how to apply the generic edge labeling algorithm. - The new
Demo.yFiles.Layout.NodeLabelingDemoshows how to use the node label models in conjunction with the yFiles generic labeling algorithms. - Added new
Demo.yFiles.Graph.BusinessProcessDiagramdemo that presents bow to create, edit, and lay out business process diagrams that adhere to the Business Process Modeling Notation. - The new
Demo.yFiles.Layout.BusRouterDemoshows how to use the orthogonal bus-style edge router.
Bugfixes
- Resizing nodes interactively did not make use of additional snap lines from the
GraphSnapContext. - The expand and collapse group node commands did not execute in case the
UseCurrentItemForCommandproperty was being used. NavigationInputMode.ExitGroupraised theGroupEnteredevent instead of theGroupExitedevent.CreateEdgeInputModestarted calculation of the target port candidates too early and did not remove the highlighting of the target node if the creation was canceled early during the gesture.- A race condition in the license verification mechanism could lead to license failures in multi-threaded environments. .
- When no license information has been embedded during compile time, the license was searched in the filesystem during runtime, instead of resulting in a license failure.
- The default implementation of
ICanvasObjectGroupreturned a broken enumerator for theIListEnumerableinterface. - A memory leak in
CreateEdgeInputModemade cleaning up a GraphControl impossible after an edge had been created interactively using that mode with snapping disabled. - CreateEdgeInputMode's
GetSourcePortCandidatemethod was sometimes invoked with the wrong location. - MouseHoverInputMode now reacts during mouse drags, too and method
Showrespects parameter if it differs from the mouse location. - Mouse events were being redispatched, even if the mouse was outside the GraphControl. This resulted in tooltips being displayed and other potential issues when the overview was used to move the viewport.
ClickInputMode.ValidHitTestablewas not always queried in certain double click configurations.- Minimum node size was not automatically provided to the algorithms library by LayoutGraphAdapter.
Automatic Layout
InteractiveOrganicLayouter: Fixed bug that prevented the calculation of any layout before the first call toWakeUp.ComponentLayouter: Fixed bug that caused a wrong component assignment if customized component IDs were used.IncrementalHierarchicLayouter: Fixed bug that sometimes caused an assignment of infinite coordinates to group nodes as well as to points of edges incident to group nodes.IncrementalHierarchicLayouter: Fixed bug that caused unnecessary crossings when using node grouping.- Overriding
yWorks.yFiles.Layout.Tree.DelegatingNodePlacer#GetLowerRightChildrenandGetUpperLeftChildrenhad no effect. - Fixed potential
IndexOutOfRangeExceptioninyWorks.yFiles.Layout.RotatedSliderEdgeLabelLayoutModel. - Fixed invalid cast in
yWorks.yFiles.Layout.Router.EdgeGroupRouterStage. - Fixed
NullReferenceExceptionwhen usingyWorks.yFiles.Orthogonal.OrthogonalLayouterin FromSketchMode. DrawingEmbedder: Fixed NullReferenceException caused by nodes having the same center.NetworkFlows: Fixed wrong calculation of the cut set returned by methodCalcMaxFlowMinCut(Graph, Node, Node, IDataProvider, IEdgeMap, INodeMap).EdgeGroupRouterStage: Fixed bug that caused violation of edge grouping constraints as well as port constraints.- Fixed potential race condition when trying to access the edge path during layout calculation.
Incompatible Changes
- When
LayoutExecutor.Durationis 0, the viewport is now only moved whenAnimateViewportis true. yWorks.yFiles.Algorithms.Util.DoubleObjectPQ: Changed the type of parameterpriorityfrominttodoublefor methodsDecreasePriority,IncreasePriorityandChangePriority.OrientationLayouter: Changed behavior for mirrored orientations, i.e., there may be a fixed position offset between the layout results of the old and new version. The new version ensures that the position of elements not changed by the layout algorithm are kept fixed.Mouse2DEventTypeshas a new enumeration member 'LostCapture'. If cascades and switches over variables of this type might need to be adjusted to properly deal with this event type.LayoutGraphAdaptercan optionally create copies of node and edge styles during layout calculation. This is controlled by the new propertyCopyStyles. Utility classLayoutExecutorenables this feature if the layout is performed in a different thread.- The
Cutcommand onGraphControlis now only enabled ifDeletableItemsallows the deletion of the currently selected nodes.
yFiles WPF 2.1.1 - Changes Since 2.1
Minor Features Added
- Added support for different double-click handling modes in
ClickInputModeas well asGraphEditorInputModeandGraphViewerInputMode.
Improvements
- LayoutModules in the demo have been improved to show the new layout features.
yWorks.yFiles.UI.Model.FoldedGraph:IsExpanded(INode)raises correct exception if node is not part of the graph.- Rules for
DesignerSerializationVisibilityhandling in GraphML are consistent now. yWorks.yFiles.GraphML.Parser.GraphMLParser: XMLExceptions wrapped in IOExceptions.yWorks.yFiles.GraphML.Xaml.XamlSerializernow supportsShouldSerialize*predicates.- The GraphML XAML parser and writer both support generic type arguments as specified in the XAML 2009 specification.
- Made SimpleLabelStyle aware of RightToLeft flow direction of the GraphControl. The renderer now automatically mirrors the text contents to compensate the transform that has already been applied to the GraphControl.
NavigationInputModeandCanvasControlhave been improved to be aware of the FlowDirection property of theCanvasControlso that in case of a RightToLeft setting the commands behave correctly.- GraphML now supports (de)serialization of generic dictionaries like
System.Collections.IDictionary<K,V> - Added
yWorks.yFiles.Layout.Hierarchic.Incremental.PartitionGrid#CreateCellSpanIdoverload that acceptsSystem.Collections.IEnumerable<V>
Bugfixes
- GraphML: Fixed broken serialization of primitives and string values in element syntax.
- GraphML: Public properties with a non-public getter or setter are ignored now.
yWorks.yFiles.GraphML.Xaml.XamlReader: XML attributes that are bound to an XML namespace are ignored if they do not specify an attached property.- Fixed crash in
yWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouterwhen a node has more than 60 selfloops. - Fixed crash when removing
IEdgethat has same source and target port. PanelNodeStylecan now deal with empty layout.- Setting
yWorks.Canvas.Input.ContextMenuInputMode#Menudid not always clean up the old menu correctly. - Some layouter implementations did not properly catch internal (non-fatal)
NullReferenceExceptions. NavigationInputModedid not correctly update the location of group nodes during expand and collapse and did not enqueue the correct undo units.- Orthogonal edge segments were sometimes broken into halves during interactive resizes of the adjacent nodes. Now the corresponding bend is moved instead.
Folding bugfixes
A great number of bugs have been fixed in the folding environment. All of them could only be triggered programmatically.
- Fixed programmatic edge creation.
yWorks.yFiles.UI.Model.GroupedGraphExtensions.CreateGroupNode(INode parent): Fixed extension method ignoring parent.- Fixed
yWorks.yFiles.UI.Model.HierarchyExtensions.GetNearestCommonAncestor()not returning correct ancestor in some cases. SetLeaf()and setLocalRootnot included in Undo queue.yWorks.yFiles.UI.Model.GroupedGraphExtensions.GroupNodes(IEnumerable<INode>)called with empty enumerable callsCreateGroupNode()instead of creating group node with empty layout.- Various bugs that occurred in rare cases due to corrupted internal data structures have been fixed.
Changes in Default Behavior
- GraphML: Handling of
DesignerSerializationVisibilityfor collection properties is now consistent with WPF and Silverlight XAML rules:- If the property is specified as a content property with
ContentPropertyAttribute:- If
DesignerSerializationVisibilityis not specified orDesignerSerializationVisibility.Contentis specified, only the content is (de)serialized. - If
DesignerSerializationVisibility.Hiddenis specified, the property is ignored. - If
DesignerSerializationVisibility.Visibleis specified and the property is read-write, the collection object itself is (de)serialized, otherwise the property is ignored.
- If
- If the property is not specified as a content property with
ContentPropertyAttribute:- If
DesignerSerializationVisibility.Contentis specified for either read-write or read-only collection properties, only the content is (de)serialized. - If
DesignerSerializationVisibility.Hiddenis specified, the property is ignored. - If
DesignerSerializationVisibilityis either not specified or set toDesignerSerializationVisibility.Visiblefor read-write collection properties, the collection object is (de)serialized. - If
DesignerSerializationVisibilityis either not specified or set toDesignerSerializationVisibility.Visiblefor read-only collection properties, the property is ignored.
- If
- If the property is specified as a content property with
- The WPF framework XAML writer is now used for classes in the
System.Windows.*namespaces only. - The WPF framework XAML reader is now also used for classes in the
System.Windows.*namespaces.
yFiles WPF 2.1 - Changes Since 2.0.1
Major Features Added
Framework requirements
- yFiles WPF now officially supports the .NET 4.0 framework. The minimum required framework is .NET 3.5 SP1. Note that there are separate demo applications available for new features that exist only in .NET 4.0 like
VisualStateManager.
Support for creating and working with orthogonal edge paths
- Class
yWorks.yFiles.UI.Input.OrthogonalEdgeEditingContextnow mediates between the various implementations that deal with repositioning nodes, bends, and ports to ensure that orthogonal edge paths stay orthogonal during the edit process. - Interface
yWorks.yFiles.UI.Input.IOrthogonalEdgeHelperdetermines how edges should be treated during editing with respect to orthogonality. - The various IInputMode implementations support editing orthogonal edge paths, as well as allow for creating an orthogonal edge path in the first place.
Interactive snapping of graph elements to guide lines and other elements during editing
- Class
yWorks.yFiles.UI.Input.GraphSnapContextsupports snapping elements to lines while they are being moved or resized interactively. This allows for conveniently editing diagrams by hand and still obtain great results with fixed distances and angles between elements in the diagram. - Interfaces
yWorks.yFiles.UI.Input.ISnapLineProviderand others can be used to influence the behavior, the types, and the display of the snap lines. - Support for intelligent magnetic grid has been integrated with the new snapping API.
GraphML changes
- The GraphML API makes use of the LINQ to XML API for XML processing and thus is easier to use and performs better than the old implementation.
Built-in support for dragging nodes from other controls to the GraphControl
- Class
yWorks.yFiles.UI.Input.NodeDropInputModehas been added to provide convenient drag and drop support on top of the existing DropInputMode implementation. - The specialized input mode can be configured to provide a live preview of the node that will be dropped.
- Dropping can be performed directly onto group nodes, making the dropped node a new child of the group.
- The new snapping features are also leveraged by this new implementation.
New Generic Style Implementations Based on ContentControls
- New styles have been implemented that make styling nodes, labels, ports, and edge segments even easier.
- For each of the new styles a specialized
ContentControlhas been implemented that provides a number of properties that can be bound to in control templates. - By default the content of the control is populated with the tag that is associated with the respective item. This makes displaying business model data that is associated with an element easy.
- Creating a new style is done by implementing a WPF Style (preferably using a XAML designer) that defines the control template and animations as well as the different visual states of the item (selection, highlight, focus) and the transitions between them.
- A separate demo shows how to leverage these style implementations to support the
VisualStateManagerthat is available in .net 4.0.
Animation improvements
- Class
Animatorhas been refactored to not use a separate thread for the animation anymore, but now uses theCompositionTarget.Renderingevent to achieve even smoother animations. - The animation priority can be fine-tuned to control whether the focus should be more on smooth animations or a responsive application.
- The
GraphOverviewControlhas been revised to be less CPU-extensive while at the same time providing real-time viewport updates. This results in a much smoother overall animation experience.
Style improvements
- All of the predefined styles available in the core of the library have been optimized for animation and fewer repaints, greatly improving the rendering speed in interactive scenarios.
- The 'modern' styles now all provide built-in high performance drop shadow implementations and the generic implementation makes use of the GPU accelerated effects that are available since .net framework version 3.5 service pack 1.
Visual Enhancements
- All visual adorners for items in the GraphControl like the marquee selection box, the handles, the highlight and selection indicators, can now easily be customized and replaced by custom XAML templates.
MarqueeSelectionInputMode.MarqueeRectangleTemplateKeydefines the template used for the selection marquee box.OverviewInputMode.ViewportTemplateKeydefines the template used for highlighting the currently visible part of the graph in theGraphOverviewControl.RectangularSelectionPaintable.TemplateKeydefines the template used for selection.RectangularFocusPaintable.TemplateKeydefines the template used for focus.RectangularHighlightPaintable.TemplateKeydefines the template used for highlight.OrientedRectangleSelectionPaintable.TemplateKey,OrientedRectangleFocusPaintable.TemplateKey,OrientedRectangleHighlightPaintable.TemplateKeydefine the templates used for labels.
Automatic Layout
- Layout algorithm class
yWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouterprovides enhanced support for swimlane layout through comprehensive new partition grid concept.
TheyWorks.yFiles.Layout.Hierarchic.Incremental.PartitionGridclass enables the definition of grid-like structures (partitions) consisting of rows and columns, and assignment of nodes of a diagram to the grid (partition) cells.
Minor Features Added
- The assemblies have been revised an annotated to correctly work with the new .NET 4.0 security transparency model.
- Many more improvements great and small for both the layout algorithms and the UI part.
yWorks.yFiles.UI.Input.IPortCandiateand default implementations have been updated to allow for dynamically determined port candidates. This enables assignment of non-discrete port locations during edge creation and edge relocation.- More fine-grained events and callbacks have been added to the various input mode implementations making customization easier, because subclassing is now less frequently required for customizations.
- Redundant folding view state data in GraphML is now omitted by default, thus greatly reducing the size of GraphML files when folding is active.
- Printing, image export and XPS export have been updated to take into account the FlowDirection of the exporting
CanvasControl. The value of theFlowDirectionproperty now influences the resulting print, image or XPS file contents.
Automatic Layout
- Layout algorithm class
yWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouternow features consistent support for layering constraints both for non-incremental as well as incremental layout mode.
Also, specifying layering constraints is now conveniently supported directly by the layout algorithm class through methodCreateLayerConstraintFactory. yWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouter: Added support for specifying a preferred time limit (in milliseconds) for the layout (see propertyMaximalDuration).yWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouter: Added support for automatic edge grouping (see propertyAutomaticEdgeGrouping).yWorks.yFiles.Layout.Orthogonal.OrthogonalLayouter,yWorks.yFiles.Layout.Orthogonal.OrthogonalGroupLayouter,yWorks.yFiles.Layout.Orthogonal.DirectedOrthogonalLayouter: Added support for considering node labels.yWorks.yFiles.Layout.Orthogonal.OrthogonalGroupLayouter: Added integrated edge labeling support.yWorks.yFiles.Layout.Orthogonal.OrthogonalLayouterandyWorks.yFiles.Layout.Orthogonal.DirectedOrthogonalLayouter: Added convenience property for integrated edge labeling:IntegratedEdgeLabeling.yWorks.yFiles.Layout.Orthogonal.OrthogonalGroupLayouter: The layouter now also considers minimum sizes for group nodes as given by the DataProvideryWorks.yFiles.Layout.Grouping.GroupingKeys.MinimumNodeSizeDpKey.yWorks.yFiles.Layout.Circular.CircularLayouter: More compact layouts can be obtained by settingPlaceChildrenOnCommonRadiusto false.yWorks.yFiles.Layout.Circular.CircularLayouter: Node labels can be considered by settingConsiderNodeLabelsto true.yWorks.yFiles.Layout.Organic.SmartOrganicLayouter: Node labels can be considered by settingConsiderNodeLabelsto true.
Graph Analysis Algorithms
yWorks.yFiles.Algorithms.Paths: added methodsFindAllPaths(Graph, Node, Node, Boolean),FindAllPaths(Graph, Node, Node, Boolean, Predicate<EdgeList>), andFindAllPathsCursor. These methods can be used to enumerate all directed or undirected paths that connect two nodes.
Improvements
GraphEditorInputMode,GraphViewerInputMode,NavigationInputMode: Added UseCurrentItemForCommands property.yWorks.yFiles.UI.Model.GraphExtensions: Added another extension method for creating labels with tag.yWorks.yFiles.UI.Model.FoldedGraph:IsExpanded(INode)raises correct exception if node is not part of the graph.yWorks.Canvas.Geometry.Structs.PointD: addedGetRounded().yWorks.yFiles.Layout.Orthogonal.OrthogonalLayouter: for layout styleyWorks.yFiles.Layout.Orthogonal.LayoutStyle.NormalTree, the grid size now also controls the distances between tree nodes.yWorks.yFiles.Layout.Orthogonal.OrthogonalLayouter,yWorks.yFiles.Layout.Orthogonal.DirectedOrthogonalLayouter: improved integrated edge labeling.yWorks.yFiles.Layout.ComponentLayouter: Improved handling of user-defined components (components defined via theGivenComponentDpKeydata provider key) when there are edges between the components.yWorks.yFiles.Layout.Tree.GenericTreeLayouter: Improved layout runtime of graphs having subtrees with a large number of nodes.- All implementations of interface
yWorks.yFiles.Layout.Hierarchic.Layererhave been adjusted to implementyWorks.yFiles.Layout.Hierarchic.Incremental.Layereras well, thereby removing the need to wrap these classes inyWorks.yFiles.Layout.Hierarchic.Incremental.OldLayererWrapperfor use withyWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouter. yWorks.yFiles.Layout.Organic.SmartOrganicLayouter: Minimal node distance is now also used for inter component spacing.yWorks.yFiles.Layout.Organic.SmartOrganicLayouter: Node subsets can now be used together with output restrictions orGroupNodeModeFixBoundsmode.yWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouter: added convenience propertiesOrthogonalRoutingandBackloopRouting.yWorks.yFiles.GraphML.Parser.GraphMLParser: XMLExceptions wrapped in IOExceptions.- Relative resource paths in GraphML are now resolved and written relative to
yWorks.yFiles.GraphML.Writer.SerializationProperties#BaseUriwhere possible. Also,yWorks.yFiles.UI.GraphControl#ImportFromGraphML(string)andyWorks.yFiles.UI.GraphControl#ExportToGraphML(string)preserve the document location. yWorks.yFiles.GraphML.Xaml.XamlReadernow supports theSystem.ComponentModel.ISupportInitializeinterface and attached properties.yWorks.yFiles.GraphML.Xaml.XamlSerializernow supportsShouldSerialize*predicates.- The GraphML XAML parser and writer both support generic type arguments as specified in the XAML 2009 specification.
Tutorials
- A new tutorial that shows how to implement custom styles for nodes, edges, ports, and labels has been added.
- The Getting Started tutorial has been improved to show the new snapping and orthogonal edge editing features.
- The existing tutorial has been revised to comply with the new API and new paradigms.
Demos Added
- A demo demonstrating shortest path calculation has been added.
- Demos that show customization of the clipboard and undoability have been rewritten and improved.
- The collapse demo that shows how tree-like graph structures can be explored interactively has been improved to use nicer styles and more layout algorithms.
- A demo that shows how the snapping feature can be customized has been added.
- A demo has been implemented that shows how to configure edges for orthogonal editing.
- The interactive drag and drop feature for nodes showing a preview and snapping is demonstrated in a new demo.
- A demo that shows how to print the canvas contents has been added.
IncrementalHierarchicLayouterdemo has been rewritten.- The OptionHandler framework for querying and presenting options and settings to the user that has been part of the core library in yFiles WPF 2.0 is now part of the demos in source code form.
- GraphEditor demo has been completely rewritten.
- GraphML demo has been improved.
- A demo showing how to use ControlStyles has been added. Also there is a similar demo showing how to use ControlStyles with VisualStateManager.
- All demos have been revised to comply with the new API and new paradigms.
Bugfixes
yWorks.yFiles.UI.LabelModels.RotatingEdgeLabelModeldid not work for zero path lengths that have bends.- Fixed bend movement along with nested group nodes.
yWorks.Canvas.Geometry.OrientedRectangle: Fixed Angle getter.yWorks.yFiles.UI.DataBinding.GraphSource: Fixed a bug that prevented an edge that had previously been removed from the model could ever be part of the model again at a later point in time.yWorks.yFiles.GraphML.Xaml.XamlReader:- In some cases, collection content wasn't handled correctly for writeable properties.
- XML comments were not skipped when reading collection content.
- Fixed bug with interface typed properties.
- Primitives in a collection context were not always serialized correctly.
- Public properties with a non-public accessor are now correctly handled by the GraphML XAML framework.
yWorks.yFiles.GraphML.Parser.GraphMLParser#Parsewill not overwrite an explicitely setyWorks.yFiles.GraphML.Writer.SerializationProperties#BaseUri.yWorks.Canvas.Input.OverviewInputMode: Fixed a possibleNullReferenceExceptionthat could happen if the control had not yet been bound to a master canvas control.- Undo/Redo did not always work properly when group node contents were moved, resized, or moved to different group nodes.
yWorks.yFiles.Layout.OrientationLayouter: Fixed wrong handling of mirror mask (seeMirrorMask).yWorks.yFiles.Layout.Hierarchic.Incremental.SimplexNodePlacer: using fixed coordinates would sometimes not result in a tight drawing.- Fixed layering problem in
yWorks.yFiles.Layout.Hierarchic.Incremental.ConstraintIncrementalLayererwhen all nodes are marked as incremental. - Fixed memory leak in
yWorks.yFiles.Layout.Hierarchic.Incremental.DefaultLayerSequencer yWorks.yFiles.Layout.Hierarchic.AsIsLayerer: Halo and other custom size specifications were ignored for the first node.yWorks.yFiles.Layout.Router.EdgeGroupRouterStagedid not work correctly whith "null" PortCandidates.yWorks.yFiles.Layout.Hierarchic.incrementalHierarchicLayouter: Simple uses of sequence constraints could result in lots and lots of unnecessary edge crossingsyWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouter: In some cases edge points could have infinite coordinates.yWorks.yFiles.Layout.ComponentLayouterdid not always work correctly ifGivenComponentDpKeyis set.yWorks.yFiles.Layout.Router.OrthogonalEdgeRouter: Fixed bug where in some cases strong port constraints were not taken into account for self-loops when local crossing minimization was enabled.yWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouter: Fixed insets of group node being treated incorrectly if non-orthogonal edge routes were used.yWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouter: Fixed rare exception about groups being "inconsistent".yWorks.yFiles.Layout.Router.OrganicEdgeRouter: Fixed bug where OrganicEdgeRouter created some extreme edge routes for larger minimal distances (seeMinimalDistance). Critical edges will now be routed straightline.- All overloads of
yWorks.Canvas.Geometry.Matrix2D#Transformnow behave consistently. - Not all image resources could be shared in GraphML.
yWorks.yFiles.UI.PortLocationModels.BendAnchoredPortLocationModelwas not always serialized correctly.
Changes in Default Behavior
- yFiles WPF 2.1 uses a new licensing mechanism based on the .NET
LicenseManagerframework. Please see the yFiles WPF Readme for further information. yWorks.yFiles.Layout.Tree.BalloonLayouterhas a new default policy for placing the children of local roots. The old policyyWorks.yFiles.Layout.Tree.ChildOrderingPolicy.Symmetriccan be set with propertyChildOrderingPolicy.yWorks.yFiles.Layout.ComponentLayouternow considers labels by default (see propertyConsiderLabels). This prevents overlaps of labels associated with different graph components.- The GraphML framework now uses
yWorks.yFiles.GraphML.Xaml.XamlReaderandyWorks.yFiles.GraphML.Xaml.XamlSerializerto read and write XAML for most types. The WPF framework implementations are still used for native WPF types. yWorks.yFiles.GraphML.Xaml.XamlReaderdoes not support the deprecatedSystem.Windows.Markup.IAddChildinterface anymore.yWorks.yFiles.GraphML.Xaml.XamlReadernow throws aDeserializationNotSupportedExceptionif a property does not exist on the current object.- GraphML image resources that are specified as XML attributes are read as
System.Windows.Media.Imaging.BitmapImage. - GraphML resource paths are now resolved and written relative to the location of the GraphML document where possible.
- Structural errors in GraphML files now always throw an
IOExceptioninstead of being ignored silently. - Redundant view state data in GraphML is now omitted by default, which is incompatible with yFiles WPF 2.0 and earlier. Set
yWorks.yFiles.GraphML.Writer.SerializationProperties#FoldingVersionto1.0to use the old behavior. CanvasPrintDocument,XPSExporter, andPixelImageExporternow honor theFlowDirectionproperty of theCanvasControlthat is used for the export operation and mirror the output correspondingly. Should this not be intendend, create a separate Control instance and set the FlowDirection to LeftToRight (which is the default).
Incompatible API Changes
- yFiles WPF now requires at least the .NET 3.5 SP1 framework.
- The default behavior of the IGraph implementations has changed so that styles and models are now shared implicitly by reference between elements. This can easily be reverted to the old behavior by setting the corresponding property in the
INodeDefaults,IEdgeDefaults,IPortDefaults, andILabelDefaultsinstances. - The implementation of the
ICloneableof the default styles in the library has been changed to consistently be a shallow clone for all properties. This allows for fine-grained control over which objects can be shared between instances. If you change a property and don't want to affect shared instances, clone the value first and then assign new values to the properties in question, instead. This way more properties can be shared, even if some properties differ. This allows for a greatly reduced memory footprint and smaller GraphML files. - Group nodes no longer automatically adjust their bounds if the bounds of the contained nodes are changed programmatically. In all interactive scenarios the bounds are updated automatically but programmatic changes to the layout of nodes need an additional call to one of the
EnlargeGroupNodeextension methods ofIGroupedGraph. This greatly simplifies the changing of the coordinates of nodes programmatically in a consistent manner and also enables automatic rerouting of orthogonal edge paths adjacent to parent nodes, among other things. Usages of theIMovableinterface should be replaced by usages of theIPositionHandlerinterface instead for the same reason. Also, the newIReshapeHandlerinterface needs to be used instead of theIReshapeableinterface to provide a context to the implementation again for the same reasons. - The
IPortCandidateinterface has been changed to allow the implementation of dynamic port candidates that are aware of a specific user-specified location. For this to work the booleanValidflag has been replaced by the three-stateValidityenum-backed property.falseandtruedirectly map toInvalidandValid. The third possible valueDynamicdoes not need to be considered in existing applications because it will only come into play if the new feature is being used actively. Also, theCreateInstancemethod has been changed to now take a parameter of typeIInputModeContextand may not returnnullanymore. Please see the compatibility source code project and the migration guide on how to properly adjust existing code. - The undo mechanism has been improved so that beginning a compound edit does not place it into the undo queue immediately. Thus the rest of the queue is not discarded anymore if the edit is canceled afterwards. The compound edit will only become visible in the undo queue once its
Endmethod has been called. - The OptionHandler framework in the
yWorks.Optionnamespace has been moved from the core library to theDemo.yFiles.Optionnamespace and became a source code demo that is used by other demos. For some style implementation classes in the core library there was built-in support for the option handling, which has been removed from the core and partially been placed into the corresponding demos. - The
DisplayNameattributes that had been declared at the properties of the style classes have been removed. Since it is not necessary anymore to obfuscate the properties and names of the style classes for the final deployment, the actual name of the properties can be used instead. - The GraphML parser API has been reworked to use the .NET LINQ to XML API. This affects most types and methods in the
yWorks.yFiles.GraphML.Parsernamespace, especiallyIInputHandler, event handlers foryWorks.yFiles.GraphML.GraphMLIOHandler#HandleDeserializationandyWorks.yFiles.GraphML.GraphMLIOHandler#QueryInputHandlersand event handlers for the events inIParseEvents. - Serialization and deserialization properties now use the strongly typed
yWorks.Support.TypedKey<T>class. For the predefined properties inyWorks.yFiles.GraphML.Writer.SerializationProperties, this change should be mostly transparent from user code. - Redundant serialization property
yWorks.yFiles.GraphML.Writer.SerializationProperties#DocumentLocationhas been removed. UseyWorks.yFiles.GraphML.Writer.SerializationProperties#BaseUriinstead. yWorks.yFiles.GraphML.Xaml.GraphMLValueSerializerContextcannot be instantiated directly anymore.
Of course, the yFiles WPF support team will aid existing customers in migrating their code and possibly data to the new API based on their subscription.
yFiles WPF 2.0.1 - Changes since 2.0.0.2
Improvements
- Made SimpleLabelStyle aware of RightToLeft flow direction of the GraphControl. The renderer now automatically mirrors the text contents to compensate the transform that has already been applied to the GraphControl.
- Improved the CollapsibleNodeStyleDecorator's renderer code to workaround an issue in WPF that prevents the FlowDirection dependency property from properly being considered in the decorator.
- The
IReparentNodeHandlerinterface has been improved to now contain a callback that handles the actual reparenting of a node. This makes it possible to add additional callbacks and custom implementations for interactively reparented nodes. MultiplexingInputModehas been improved to automatically replace Cursor instances reported by concurrent child instances so that for FlowDirection settings of RightToLeft in the CanvasControl the cursors are mirrored horizontally. For this callback methodReplaceCursorhas been added.NavigationInputModeandCanvasControlhave been improved to be aware of the FlowDirection property of theCanvasControlso that in case of a RightToLeft setting the commands behave correctly.- New overloads have been added in
GraphMLIOHandlerto theAddRegistryInputHandlerandAddInputMapperFuturemethods that make common tasks more easy to implement.
Bug fixes
- Fixed an exception in the undo code that occurred in the context of
FoldingManagerwhen nodes where moved into a collapsed group node. - Fixed a problem that resulted in edges created interactively where there were no port candidates available but the
CreateEdgeInputMode.ConncectToPortCandidatesOnlyproperty was set to false had the wrong source port location model assigned. This resulted in these edges unexpectedly jumping to the mouse cursor. - String values in list and array contexts in GraphML files did not have an enclosing tag. This has been fixed.
- Fixed an exception that occurred when disabling shared references in
GraphMLIOHandler. - The setter of the property
LocalCrossingMinimizationinyWorks.yFiles.Layout.Router.OrthogonalEdgeRouterbehaved incorrectly. This has been fixed. Also the propertyCustomBorderCapacityEnabledhad no setter. The property has been renamed toUseCustomBorderCapacityand the getter has been reenabled.
Incompatible Changes
- The two previously undocumented methods in the layout's
yWorks.yFiles.Algorithms.NodeclassSuccessorsandPredecessorshave now been documented and implemented correctly (the implementation of the two methods has been swapped). - The
IReparentNodeHandlerinterface has been changed to contain the newReparentNodemethod. Existing implementations can simply delegate to the default implementation inReparentNodeHandler. - Code that replaced the navigational commands to honor the FlowDirection property of the CanvasControl needs to be replaced because the implementations will now automatically mirror the behavior in case of a RightToLeft setting.
- The first parameter of
yWorks.yFiles.Layout.Hierarchic.Incremental.ILayers.Inserthas been corrected to be of typeyWorks.yFiles.Layout.Hierarchic.Incremental.LayerType GraphMLIOHandler's methodAddRegistryInputHandlerpreviously resulted in a runtime exception if there was a mapper in the registry with the same tag. The new implementation will either reuse the existing instance if it matches the type signature or remove the old instance prior to registering a new one. MethodCreateMappermay be overwritten to adjust this default behavior.- The property
LocalCrossingMinimizationinyWorks.yFiles.Layout.Router.OrthogonalEdgeRouterdid not work as expected. The behavior has now been adjusted and thus changed. Also the read-only propertyCustomBorderCapacityEnabledhas been renamed to a read-write propertyUseCustomBorderCapacity.
yFiles WPF 2.0.0.2 - Changes since 2.0.0.1
Bug fixes
- Fixed a NullReferenceException in the context of
IFoldedGraphthat could happen in multi-level node collapse operations as a result to calls toCollapse.
yFiles WPF 2.0.0.1 - Changes since 2.0
Bug fixes
- Fixed an exception (about unit being disposed already) in
UndoEngineif anIUndoUnitwas added within theAutoAddTimeSpanto the machine after the engine had been cleared. - Calling
IHierarchy.SetParentwhere the new parent was previously declared a leaf (instead of a group node) caused problems because the fact that the node now no longer was leaf was not published through an event. This resulted in inconsistent display of the views if theFoldingManagerwas used. Also the leaf state was not correctly rolled back during undo. - All built-in GraphML
DOMInputHandlercould not parse GraphML default attribute values. - Fixed incorrect implementation of various
BridgeManager.RegisterXXXObstaclemethods. - The
GroupingKeys.MinimumNodeSizeDpKeywas not automatically added to theLayoutGraphAdapter. Now aDataProvideris added to the adapter graph that yields the minimum sizes for nodes that can be obtained from theISizeConstraintProvider<INode>in the node's lookup. - Fixed code in
FixedGroupLayoutStagethat threw aNullReferenceExceptionand rendered the stage basically useless. - Fixed exception in
FixedGroupLayoutStagewhen orthogonal routing was specified, but no DataProvider for selected nodes was set. - Fixed "Inconsistent Grouping" exception in IncrementalHierarchicLayouter.
yFiles WPF 2.0
Major New Features
- The yFiles Layout and Analysis algorithms present in
yFilesAlgorithms.dllhave been rewritten to remove the dependency on the Visual J# runtime and to conform to the .NET coding and naming conventions. - There is now sophisticated support for folding operations in a grouped graph. This enables the user to expand and collapse the contents of group nodes, as well as to show the contents of a specific group node only. All of this can be used to display multiple different views of the same graph structure.
- Convenience classes have been added to easily bind your business model data source to a GraphControl. These utilities create dynamically updated graph instances that represent the structure of entities in the business model. For this the WPF data binding mechanisms are leveraged enabling the use of a great number and variety of data sources.
- The support for GraphML for importing and exporting graphs and associated data has been rewritten and is now easier to use and customize.
- The core visual graph API has been revised and now makes heavy use of structs to pass rectangle, size, and point coordinates between the methods, reducing the code bloat and ambigious and long argument lists. Also, the use of structs allows for cleaner code that uses operator overloading for geometric vector operations, while at the same time making it more obvious where data is passed by value instead of by reference.
- The main interfaces that make up the graph API have been simplified. Convenience methods have been removed from the interface and moved to extension methods. This makes implementing the interface easier, results in a more predictable implementation while at the same time making the usage of the interface more convenient through more extension methods.
- The location of ports is now determined by port location models, making it easier to customize the location and dynamic relocation of ports if nodes are being resized, etc.
- For each of the possible visual styles there is now a simple abstract base class implementation that can be used as a basis of custom styles. These base classes remove the need to implement a lot of boilerplate code that was previously necessary for even the most simple style implementations.
Visual Enhancements
- Class
yWorks.Canvas.Model.BridgeManagerprovides support for so-called bridges in edge paths that resolve the visual ambiguity induced by edge crossings.
Automatic Layout
- Layout algorithm
yWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouternow supports swimlane layouts of hierarchically grouped graphs. - Layout algorithm
yWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouternow allows to specify placement constraints for nodes that reside in the same layer. A default implementation of new interfaceyWorks.yFiles.Layout.Hierarchic.Incremental.ISequenceConstraintFactoryenables user-defined constrained node sequencing, where nodes can be specified to be placed at the beginning or the end of their respective layer, or can be specified to be placed before/after a given reference node. - A new domain-specific layout algorithm,
yWorks.yFiles.Layout.Genealogy.FamilyTreeLayouter, has been added that is especially suited for genealogical family trees. - Minimum size constraints for group nodes have been added to the major layout algorithms
yWorks.yFiles.Layout.Hierarchic.HierarchicGroupLayouter,yWorks.yFiles.Layout.Organic.OrganicLayouter,yWorks.yFiles.Layout.Organic.SmartOrganicLayouter, andyWorks.yFiles.Layout.Hierarchic.IncrementalHierarchicLayouter.
the relevant data can be bound to the graph using data provider look-up keyyWorks.yFiles.Layout.Grouping.GroupingKeys.MinimumNodeSizeDpKey. - Significantly improved generic label placement algorithms
yWorks.yFiles.Layout.Labeling.SALabelingandyWorks.yFiles.Layout.Labeling.GreedyMISLabeling. The number of overlapping labels has been drastically reduced. Furthermore, these algorithms now place labels associated with theFreelabel model. - Class
yWorks.yFiles.Layout.SequentialLayouterhas been added, that can be used to run several layouters sequentially one after the other.
Minor New Features
- All items that make up the graph structure can now be easily associated with a user tag of any kind, which can be specified at creation time. This allows for easier binding to custom business data and less code bloat.
- The mapper registry that can be used to register arbitrary maps of data for the items in the graph has become a first-class citizen of IGraph, making it more accessible. Also meta-data can now be associated with each mapper in the registry.
- Class LayoutExecutor makes it easy to launch layout algorithms and perform animations both synchronously and assynchronously.
- The implementations in the Algorithms and Layout library part now make use of the System.Collection interfaces and allow for using the
foreachconstruct. Also, numeric constants have been replaced with enumerations where appropriate, and pairs of getters and setters have been replaced with properties. - Lots of extension methods have been added that greatly facilitate working with the lookup API, the layout API, the mapper registry, and IGraph in general.
- The defaults for styles and models that are used by IGraph have been refactored and can now more easily and more consistently be set, modified, stored, and restored.
- More Routed UI Commands have been added to the input mode architecture and input mode implementations, making customization and reusage of existing gesture even simpler. All commands can now be localized and default key bindings can be easily overridden.
- Many different fine-grained events and callbacks have been added to the various input mode implementations making customization easier because subclassing is now less frequently required for customizations.
- GraphControl now has the notion of a "current" item which can be adorned by a focus rendering and which will automatically be highlighted if the graph control has keyboard focus.
- A default keyboard navigation feature has been implemented that allows for moving, extending, toggling, and modifying the selection, setting the current item and navigating into and out of groups in the context of a folded graph.
- Undoable edits in the undo queue can now easily be localized.
- Important parts of the library have been annotated with value analysis attributes that can be used to indicate possible NullReferenceExceptions and superfluous null checks.
- Many places in the library that previously allowed null values now require non-null values. Void and Null Implementations have been provided that now take their place and making most checks for null in code obsolete.
- The focus and selection visualization for nodes, edges, and labels can now be easily customized using component resource keys.
- Many of the default style implementations have been enhanced in functionality and for some it was possible to further improve rendering performance.
- Changing label and port locations is now animated smoothly. Also, the feel of the animation of the viewport has been improved.
- Many more improvements great and small for both the Layout algorithms and the Viewer.
New Demos and Documentation
- Added a tutorial solution consisting of a number of Visual Studio projects that show how to make use of the basic features in the library in a step-by-step manner.
- Added documentation and demos for the new features. Among others, there are new demos that show how to use many of the new convenience extension methods, the new databinding features, the reworked GraphML engine, and the improved input modes, as well as the new abstract style classes.
- Revisited demos to make use of the new features and paradigms.
Incompatible Changes
Being a major release, this release is API incompatible with previous yFiles WPF releases. Namespace names have changed, interfaces, classes, and methods have been refactored, some have been renamed or removed. No features or functionality has been removed.
There is a migration guide available that lists the changes that need to be done for existing projects to compile with this release. Also, the distribution contains a compatibility library that can be referenced in existing projects to facilitate the migration. It consists of adapter classes and extension methods that simulate or provide the legacy API in the new release. The sources for this compatibility library are also available, making it possible to leverage the capabilities of modern IDE refactoring tools to semi-automatically migrate existing code.
The GraphML that is written by this version is slightly incompatible with previous releases. However, a compatibility library is included in the distribution that can be used to import GraphML that has been written with previous versions. Also, this library mimics the legacy API so that existing code needs only marginal adjustments to work with the newer API.
Of course, the yFiles WPF support team will aid existing customers in migrating their code and possibly data to the new API based on their subscription.
yFiles WPF 1.0.0.2
Improvements
- Various methods in
DefaultGraphhave been improved to perform better for certain use-cases. E.g. setting styles of items to the same instance as before will not fire events anymore. Also setting other properties via theIGraphinterface to the exact same values will not trigger events anymore. AbstractGraphWrapperwas not forwarding theDisplaysInvalidatedevent. This has now been implemented properly.y.layout.organic.InteractiveOrganicLayouter: added methody.layout.organic.InteractiveOrganicLayouter#startLayoutandy.layout.organic.InteractiveOrganicLayouter#stopAndWait. Adjusted corresponding demos.y.layout.hierarchic.IncrementalHierarchicLayouter: Sometimes if both swimlanes and groups and layers have been defined by the user, the algorithm would place the group nodes into newly created layers in order to avoid group node overlaps, although this might not always be necessary. The algorithm has been improved to better detect overlaps.
Bugfixes
- Some
IEnumeratorimplementations in the context ofDefaultGraphthrew exceptions ifMoveNext()was called after it yieldedfalsefor the first time. This has been fixed to adhere to the specification, so that they will continue to yieldfalseinstead of throwing exceptions. - The GraphOverviewControl threw an exception under certain circumstances because of the above bug. The code has been adjusted not to trigger the above (fixed) bug, too.
y.layout.hierarchic.ConstraintLayerer: fixed possible NPE when the unconstrained layering would already contain same layer edges.y.layout.router.GroupNodeRouterStage: Fixed bug where edges that end at selected group nodes are not routed wheny.layout.router.OrthogonalEdgeRouter#ROUTE_EDGES_AT_SELECTED_NODESwas set.
yFiles WPF 1.0.0.1
Improvements
- The
Printconvenience methods inCanvasControlandCanvasPrintDocumentrequired the user to enter values into the printer setup dialog twice if the default style was used. The second dialog has now been removed. - Hit test implementation of some of the non-rectangular node styles has been improved to take the fuzzy hit test radius into account.
y.layout.grouping.InsetsGroupBoundsCalculatorhas been enhanced to optionally take node labels of child nodes into account when calculating the bounds of a given group node. See alsoisConsiderNodeLabelsEnabled()andsetConsiderNodeLabelsEnabled(boolean).
Bugfixes
- The tree table view of the
OptionHandlercaused high CPU usage during idle display.TreeListViewcontained an endless dispatch loop which has been fixed. - Added updated GraphML schema for yFiles WPF
CanvasPrintDocumentdid not honor margins correctly which resulted in wrong poster sizes and unclipped content. MethodPreparePosterPrintinghad to be changed incompatibly in order to fix this.CanvasPrintDocumentfailed to render page marks. EnablingPageMarkPrintingnow correctly renders page marks.- The
OverviewGraphPaintableperformed badly for larger graph structures. This massively affected the performance of theGraphOverviewControl. The implementation needed to be refactored incompatibly to allow for high performance visual updates. y.layout.router.OrthogonalEdgeRouter: Fixed bug where edges weren't routed orthogonally if rerouting was enabled.- Fixed bug where wrong minimum size is set when data provider
y.layout.LayoutConstants.MINIMUM_NODE_SIZE_DPKEYis missing. y.layout.labeling.MISLabelingAlgorithm: Fixed calls to getProfit after labeling causing NullReferenceException.
Incompatible Changes
- Method
PreparePosterPrintingwas missing themarginsparameter that has been added. Code that had overridden or called thisprotectedmethod needs to be adjusted. ProtectedMethodsCreateXXXVisualinOverviewGraphPaintablehave been removed in favor of the correspondingGetXXXVisualCreatormethods. Calls to these methods need to obtain the visual indirectly from the creator instance, now. Overriding subclasses need to implement theIVisualCreatorinterface instead to allow for updates of the visual.
yFiles WPF 1.0
yFiles WPF 1.0 is the initial release of yFiles WPF. This release has been created on the basis of yFiles.NET 3.1 (which is based on Windows Forms technology). For users who have created applications on top of yFiles.NET 3.1, there is a short Migration guide available.