Skip to content

GraphX for.NET

Compare
Choose a tag to compare
@panthernet panthernet released this 28 Jun 10:50
· 177 commits to PCL since this release

RELEASE 2.2.0

RELEASE NOTES:
New features can still have some bugs as there are many scenarios that might involve them and it's hard to check all of them on my own. If you feel uncomfortable with anything in this release please let me know.
I appreciate any feedback as this is almost the only reason i'm still working on GraphX. Thanks!

NEW TERMS:
VAESPS - vertex and edge skip processing support
VCP - vertex connection point

HIGHLIGHTS:

  • VCPs has been added into GraphX making edge endpoint fixation(binding) possible. By default GraphX automaticaly calculates edge endpoint position relative to vertex dimensions and approximate math shape, but with this feature on you'll be able to bind edge endpoint to a separate customizable object. This will allow you to create static edge fixation endpoints on the vertex and give you full control over edge endpoints positioning.
    Now GraphX for WPF requires only .NET Framework 4.0 to build & run. Deprecated all code that required .NET 4.0.3
  • Now you can easily customize edge pointers with the help of DefaultEdgePointer class which can host any content including Image/Path and supports rotation. Changes include more precious edge endpoint calculations so the edge will overlap with the edge pointer no more. Because of these changes the old logic that utilizes direct Path object in EdgeControl template will be removed completely in favor of notable performance improvements.
  • Serialization has been decoupled from GraphX completely to allow bring much more freedom to custom serializers. All what GraphX do now is provide serialization data and accept serialization data for deserialization. Serialization classes are not limited by interfaces now. See FileServiceProviderWpf class for an example.
  • Now you can use "http://schemas.panthernet.ru/graphx/" XAML namespace in GraphX for WPF for all its visual content. Additionaly, assemblies (and output filenames) for WPF/METRO dlls are both changed to GraphX.Controls.dll so Post-Build process copies output files to GraphX/Bin folder with distinct filenames reflecting the platform as before.
  • Performance improvements are always welcome. In this release the whole layout calculation logic has been revisited in terms of both performance and code quality gains. We've also eliminated some redundant layout updates, moved all math & algorithms handling from GraphArea directly to LogicCore under better async implementation, cleaned up ZoomControl logic, revisited edges & edge labels code to remove redundant calculation passes.

DETAILED CHANGES:

  • Added support for custom VCP [WPF, METRO]
    • New control class added: StaticVertexConnectionPoint. It represents ContentControl which can host virtualy any valid object.
    • VCP supports the same math shapes as VertexShape property or can use VertexShape::None value to disable precise edge endpoint calculations
  • Added vertex and edge skip processing support to METRO version (VAESPS) [METRO]
  • Added VAESPS for following algorithms: Circular [ALL]
  • Added VertexShape::None enum option, currently affecting only VCP logic [ALL]
  • Added different layout options to EfficientSugiyama algorithm using new Direction param [ALL]
  • Added true orthogonal edge routing for EfficientSugiyama algorithm using EdgeRouting param [ALL]
  • Added new property GraphArea::ControlsDrawOrder which defines vertex or edges should be drawn topmost [WPF, METRO]
  • Added GraphArea::PreloadGraph() method for manual graph rendering which generate vertices and edges from GraphArea::LogicCore.Graph property w/o any algorithms and also sets vertices positions if needed [WPF, METRO]
  • Added new EdgeControl template PART (PART_SelfLoopedEdge) for custom self looped edge indicator visualization. It represents FrameworkElement and if specified in the template will be positioned in the top left vertex corner. Also made indicator settings more flexible by implementing some dependency props [WPF, METRO]
  • Added StateStorage::SaveOrUpdateState() method for easier use [WPF,METRO]
  • Added new read only property EdgeControl::IsParallel that identifies edge as currently parallel to other edge. + Made GraphArea::UpdateParallelEdgesData() method public to be able to refresh IsParallel property on manual graph operations [METRO, WPF]
  • Added EdgeLabelControl::FlipOnRotation dependency property which controls if label should be flipped when axis is changed while rotating [WPF, METRO]
  • Fixed parallel edges labels handling. Now edge labels are more readable when there are two of them [WPF, METRO]
  • Fixed edge routing when graph state has been loaded. Graph state now stores AlgorithmStorage too [ALL]
  • Fixed ZoomControl zoom-out to the value equal to zoom-in resulting in similar smooth zoom [WPF, METRO]
  • Fixed ZoomControl::Zoom property change not firing [WPF, METRO]
  • Fixed manual graph composition routines in case of ER algorithm is set [ALL]
  • Fixed layout algorithm calculations to always receive actual vertex positions as input parameter. This will fix VAESPS for default algorithms. [WPF, METRO]
  • Fixed outdated edge rendering in some cases when vertex coordinates are changed manually [WPF, METRO]
  • Fixed edge overlapping edge pointers [WPF, METRO]
  • Fixed use of ControlFactory for edge deserialization [WPF, METRO] thanks to perturbare
  • Fixed some algorithm calculation problems, especial FR [ALL]
  • Fixed EdgeControl.ShowArrows to implement DependencyProperty [WPF, METRO] thanks to perturbare
  • Fixed minor performance problems in ZoomControl [METRO]
  • Fixed and enhanced automatic data object Id resolve logic [WPF,METRO] thanks to perturbare
  • Fixed ZoomControl zoom sometimes not firing from code call after control is loaded [WPF]
  • Fixed VB sample project dependencies and refactored code a bit
  • Reorganized Example apps namespaces and code for greater good :)
  • Made EdgeControlBase::UpdateEdge() method public. It can be used now to fully update edge visual on custom edge-related modifications [WPF, METRO]
  • Improved main layout calculation logic to gain performance improvements [WPF, METRO]
  • Merged EdgePointerImage and EdgePointerPath into one universal DefaultEdgePointer class [WPF, METRO]
  • Improved edge and its template parts rendering/calc performance [WPF, METRO]
  • Enhanced edge labels logic so now it don't require additional template bindings and modifications (Angle or RenderTransform) [WPF]
  • GraphArea::PreloadVertexes() now accepts graph param as optional (null by default) and uses LogicCore.Graph in that case [WPF, METRO]
  • Decoupled serialization logic from GraphX completely [ALL] thanks to perturbare
  • Adjusted FR and BoundedFR default values for random initial positions [All]
  • Now GraphX for WPF requires only .NET Framework 4.0 to build & run [WPF]
  • Refactored almost all of the GraphX code for improvements and code quality. Changed many namespaces for better name reflection [ALL]

BREAKING CHANGES:

  • !!!WARNING!!! This GraphX version has fallen under the heavy hand of code refactoring and along with the numerous code improvements almost ALL of the namespaces has been changed to better reflect logical code grouping and ease additional platform support through code reusability. Also i've get rid of the several different XAML xmlns usings in favor of single one. I'm very sorry that this changes will force you to update your GraphX projects but i realy felt that i must do it once and for all. You will have to change most of the usings in code and XAML templates: i strongly recommend you to use Resharper or any other code quality tool which will help you to do this in minutes (or even seconds).
    Core changes:
    • All controls, behaviours and their interfaces are moved to GraphX.Controls namespace
    • All algorithms are spreaded across GraphX.PCL.Logic.Algorithms namespace with additional OverlapRemoval, LayoutAlgorithms, EdgeRouting endings
    • All base models and interfaces are now in GraphX.PCL.Common.Models namespace
    • All GraphX primitives (Point, Rect, etc.) are left in GraphX.Measure for better code readability in cases when they are intersected with System.Windows namespace twins
  • IGXLogicCore now include ExternalLayoutAlgorithm, ExternalOverlapRemovalAlgorithm, ExternalEdgeRoutingAlgorithm properties for simplier external algo assignment
  • Now GraphX for WPF requires only .NET Framework 4.0 to build & run
  • Serialization decoupling process changes some method names: GraphArea::SerializeToFile() -> GraphArea::ExtractSerializationData() and GraphArea:: DeserializeFromFile() -> GraphArea::RebuildFromSerializationData()
  • EdgeLabelControl no longer needs default Angle binding and RenderTransformOrigin setup. They are processed internally [WPF]
  • GraphArea::GenerateGraph() method now has generateAllEdges param True by default.
    Renamed following peoperties, moved them to EdgeControlBase and implemented them as DependencyProperty:
    • LogicCore::EdgeSelfLoopCircleOffset -> SelfLoopIndicatorOffset
    • LogicCore::EdgeSelfLoopCircleRadius -> SelfLoopIndicatorRadius
    • LogicCore::EdgeShowSelfLooped -> ShowSelfLoopIndicator
  • Renamed following ZoomControl properties:
    • ZoomDeltaMultiplier -> ZoomSensitivity
    • MaxZoomDelta -> MaximumZoomStep
  • Completely deprecated EdgeControl::PART_edgeArrowPath template PART in favor of the new DefaultEdgePointer (PART_EdgePointerForSource & PART_EdgePointerForTarget). Please renew your custom templates. You can find an example in Generic.XAML template.
  • Self looped edges display logic has been slightly changed with the introduction of custom template PART (PART_SelfLoopedEdge). Now LogicCore::EdgeSelfLoopElementOffset is (0,0) by default and indicator is shown in the top left vertex corner minus indicator size. You can change this behavior by overriding EdgeControl::PrepareEdgePath() method.
  • GetVertexSizeRectangles() method moved from GraphArea to LogicCore.
  • Edge labels placement logic has been slightly changed when they are applied to parallel edges. Labels offset now translates them into different directions, for ex. one up, one down, one up.. etc. This behavior helps to better place labels for double parallels. Also parallel edge labels now are not flipped when axis changes during label rotation. If you're uncomfortable with these changes, please let me know!