FlowGraph v0.8.0
New Features
-
Resize Handle Modes - Control which resize handles appear on nodes with the new
ResizeHandleModeflags enumNode.AllowedResizeHandlesproperty specifies which handles to display- Predefined combinations:
Corners,Edges,Horizontal,Vertical,All - Useful for shape nodes where only certain resize directions make sense (e.g., cylinders should only resize from edges)
-
Figma-style Resize Modifiers - Hold modifier keys while resizing for advanced behavior:
Shift- Maintain aspect ratioAlt- Resize from centerShift+Alt- Both combined
-
Quadtree Spatial Index - O(log N) hit testing performance for large graphs
- Automatic spatial partitioning for nodes and shapes
- Significant performance improvement for graphs with 100+ elements
Bug Fixes
- Zoom Centering - Fixed zoom drifting toward top-left when using toolbar buttons
- Root cause: Missing
RenderTransformOrigin="0,0"on MainCanvas - Avalonia defaults to (0.5, 0.5), causing transforms to apply around center instead of top-left
- Now uses
TransformGroupwith separateScaleTransform+TranslateTransform(like Nodify-Avalonia)
- Root cause: Missing
- Box Selection in Direct Rendering Mode - Fixed positioning issues with selection rectangle
- Shape Selection in Retained Mode - Fixed shape selection not working correctly
- Shape Visual Updates - Shapes now update correctly during resize and selection changes
- Coordinate Transformations - Consistent coordinate handling across all input states
Internal Improvements
- InputDispatcher Architecture - New hybrid InputProcessor + Behavior pattern for cleaner input handling
- InputCoordinatesAdapter - Consistent coordinate transformations across rendering modes
- ViewportOverlayPositioner - Prevents Panel/Canvas positioning bugs for overlay elements
- ViewportState.ApplyToTransformGroup() - New abstraction for applying zoom/offset to ScaleTransform + TranslateTransform
API Additions
ResizeHandleModeenum inFlowGraph.CorenamespaceNode.AllowedResizeHandlesproperty withNodeDefinitionsupportGraph.ShapesChangedevent for dynamic shape updatesViewportState.ApplyToTransformGroup(ScaleTransform, TranslateTransform)method
FlowGraph v0.7.0
New Features
- Edge Locking - Edges can now be locked to prevent modification
- Port Tooltips - Hover over ports to see descriptive tooltips
- Hierarchical Grid Background - New grid pattern option with major/minor gridlines
- Configurable FitToView Padding -
FlowCanvasSettings.FitToViewPaddingcontrols the margin around fitted content
Bug Fixes
- FitToView in Direct Rendering Mode - Fixed FitToView button not updating visuals (only grid dots changed, not nodes)
- FitToView with Shapes-Only Graphs - FitToView and CenterOnGraph now work correctly when graph contains only shapes (no nodes)
- FitToView Element Inclusion - FitToView now includes all elements (nodes, shapes, groups) with proper padding
- Cache Invalidation - Fixed spatial index not updating when node positions change, causing stale hit-test results
- Obsolete API Warnings - Resolved CoordinateSpace.Screen deprecation warnings
Performance Improvements
- Render Service Optimization -
ICanvasRenderService.Invalidate()now uses O(1)InvalidateVisual()instead of O(n)RenderAll() - Batched Updates - Property change handlers now use batched methods (
UpdateNodeAfterMove,UpdateNodeAfterResize) reducing redundant render calls from 3-4× to 1× - Event-Based Cache Invalidation - Added
PositionChangedandBoundsChangedevents for efficient cache invalidation
Internal Improvements
- Renamed rendering classes for clarity:
GraphRenderer→CanvasElementManager(it manages elements, doesn't render)DirectGraphRenderer→DirectCanvasRenderer(handles all canvas elements, not just graphs)IGraphRenderService→ICanvasRenderService
- New batched API methods:
ICanvasRenderService.UpdateNodeAfterMove()- Efficient position change handlingICanvasRenderService.UpdateNodeAfterResize()- Efficient size change handling
FlowGraph v0.6.0
✨ Major Refactor: Type-Safe Coordinate System
A comprehensive refactor to prevent coordinate space confusion at compile time.
New Features
-
Typed Coordinate Types - New types in
FlowGraph.Core.Coordinates:CanvasPoint,CanvasVector,CanvasRect- Canvas/graph space coordinatesViewportPoint,ViewportVector,ViewportRect- Screen/viewport space coordinates- These prevent accidental mixing of coordinate spaces at compile time
-
Type-Safe FlowCanvas API:
GetTypedCanvasPosition(e)→ ReturnsCanvasPointGetTypedViewportPosition(e)→ ReturnsViewportPoint- Use these for extension/Pro code that needs pointer coordinates
-
Mode-Agnostic Input System - All input states now work correctly in both Visual Tree and Direct Rendering modes without special-case handling
Deprecated APIs
The following methods are deprecated and will be removed in a future version:
| Deprecated Method | Replacement |
|---|---|
FlowCanvas.GetCanvasPosition(e) |
GetTypedCanvasPosition(e) |
FlowCanvas.GetViewportPosition(e) |
GetTypedViewportPosition(e) |
ViewportState.ScreenToCanvas() |
ViewportState.ViewportToCanvas() |
ViewportState.CanvasToScreen() |
ViewportState.CanvasToViewport() |
Internal Improvements
- All input states (
DraggingState,ConnectingState,BoxSelectingState, etc.) migrated to typed coordinate system IInputCoordinatesinterface abstracts rendering-mode-specific coordinate conversionIRenderTargetinterface provides mode-agnostic temporary visual rendering- Removed debug statements from production code
Documentation
- Updated
docs/COORDINATE_SYSTEM_ARCHITECTURE.mdwith completion status - All implementation phases are now marked as ✅ COMPLETE
FlowGraph v0.5.1
Bug Fixes
- Fixed Edge Drag Coordinate Mismatch - Dragging from ports to create or reconnect edges now correctly follows the cursor
- The temporary edge line was severely offset due to mixing screen and canvas coordinate systems
GraphRenderer.GetPortPosition()returned screen coordinates, but edge visuals onMainCanvasrequire canvas coordinates
API Improvements
- Explicit Coordinate System API - Renamed ambiguous
GetPortPosition()to two explicit methods:GetPortScreenPosition()- Returns port position in screen coordinates (for hit testing, snap distance calculations)GetPortCanvasPosition()- Returns port position in canvas coordinates (for drawing visual elements on MainCanvas)- This prevents future coordinate system bugs by making the API self-documenting
FlowGraph v0.5.0
⚠️ Breaking Changes
- Graph API Refactor -
Graph.Elementsis now the single source of truthGraph.NodesandGraph.Edgesare now read-onlyIReadOnlyList<T>views- Use
graph.AddNode()andgraph.AddEdge()for mutations - Use
graph.Elements.Remove()to remove elements CollectionChangedevents replaced withNodesChangedandEdgesChangedevents
Migration Guide
| Old API | New API |
|---|---|
graph.Nodes.Add(node) |
graph.AddNode(node) |
graph.Edges.Add(edge) |
graph.AddEdge(edge) |
graph.Nodes.Remove(node) |
graph.Elements.Remove(node) |
graph.Edges.Remove(edge) |
graph.Elements.Remove(edge) |
graph.Nodes.CollectionChanged |
graph.NodesChanged |
graph.Edges.CollectionChanged |
graph.EdgesChanged |
New Features
-
Extensibility Interfaces
ICollisionProvider- Interface for custom collision detection implementationsISnapProvider- Interface for single-authority drag architectureResizableVisualpattern for unified render service
-
Shape System Enhancements
- Shape selection and hit-testing support
- Shape serialization with full round-trip support
-
Public Events API - Internal canvas events now exposed as public API on
FlowCanvas
Performance Improvements
- O(1) Grid Panning - Transform-based optimization eliminates per-element updates
- Phase 2 Retained Mode Rendering - Zoom no longer clears/re-renders entire canvas
- Pan: O(1), Zoom: O(handles) instead of O(n), Add/Remove: O(1)
- DirectRendering Optimizations - Skip visual tree operations in DirectRendering mode
Internal Improvements
- Massive code quality refactor:
DirectGraphRendererandEdgeVisualManagersplit into partial classes ArrowGeometryHelperconsolidates arrow point calculationsGraphDefaultsnow includes bezier control point and arrow constantsEdgeStrokeThicknesssetting added toFlowCanvasSettings- Removed
BulkObservableCollectionand bidirectional sync code (no longer needed)
FlowGraph v0.4.2
Performance Improvements
- Critical Hit Testing Optimization - Eliminated 56 million comparisons in edge hit testing that caused 1-second delays on interactions
- O(1) Group Depth Lookups - Replaced recursive traversal with dictionary-based lookups for
GetGroupDepth() - Spatial Grid Edge Generation - Optimized stress test edge generation using spatial partitioning
- LOD Rendering - Added level-of-detail rendering for improved performance at different zoom levels
New Features
-
Edge Routing Enhancements
- New
EdgeRoutingModeenum for manual waypoint editing support (Normal, Manual, Guided) - Constraint support for
SmartBezierRouterGuided mode - Direction-aware edge label placement with perpendicular offsets
- Direction-aware bezier curves based on port position
- New
-
Port Visibility Control - New
ShowPortssetting to control port rendering -
PortPosition Extensions - Helper methods for arrow direction calculation
Bug Fixes
- Fixed edge rendering delay when adding/removing connections via mouse
- Fixed resize handles not respecting custom renderer dimensions
- Fixed shape panning issues and restored light theme support
- Edge changes now properly trigger redraw in direct rendering mode
Internal Improvements
- Bidirectional sync between legacy Nodes/Edges and Elements collections
- Polymorphic
elements[]serialization format for unified element handling - Element-based commands (
MoveElementsCommand,RemoveElementsCommand,ResizeElementsCommand) - Unified Z-order rendering orchestrator
- Updated all NuGet packages to latest versions (Avalonia 11.3.11, SkiaSharp 3.119.1)
FlowGraph v0.4.1
Bug Fixes
- Fixed Background Renderer Coordinate Transformation - Custom background renderers now correctly align with nodes when the viewport is panned or zoomed
- Fixed
CanvasToScreenformula inBackgroundRenderContext: was(x - offset) * zoom, now correctlyx * zoom + offset - Fixed
ScreenToCanvasformula: wasx / zoom + offset, now correctly(x - offset) / zoom - This resolves issues where sequence diagram lifelines and other background elements appeared misaligned with their associated nodes
- Fixed
FlowGraph v0.4.0
⚠️ Breaking Changes
- Canvas-First Architecture - The Graph model now uses a unified
Elementscollection as the primary data source- New API: Use
graph.Elements.Nodesandgraph.Elements.Edgesfor accessing nodes and edges - Deprecated:
graph.Nodesandgraph.Edgesproperties are now marked[Obsolete]but remain functional for backward compatibility - Migration: Replace
graph.Nodeswithgraph.Elements.Nodesandgraph.Edgeswithgraph.Elements.Edgesin your code
- New API: Use
New Features
-
Unified Elements Collection - Single source of truth for all canvas elements
Graph.Elementsproperty provides access to all nodes, edges, and future element typesGraph.Elements.NodesreturnsIEnumerable<Node>for type-safe node accessGraph.Elements.EdgesreturnsIEnumerable<Edge>for type-safe edge access- Enables future extensibility for custom element types (annotations, shapes, etc.)
-
Improved Internal Architecture
- Cleaner separation between the unified elements model and legacy ObservableCollection-based APIs
- Better support for custom renderers and element types
- Simplified coordinate transformations with
RenderElements()API
Migration Guide
Before (v0.3.x):
// Accessing nodes and edges
var nodes = graph.Nodes;
var edges = graph.Edges;
var node = graph.Nodes.FirstOrDefault(n => n.Id == "myNode");After (v0.4.0):
// Use Elements collection for new code
var nodes = graph.Elements.Nodes;
var edges = graph.Elements.Edges;
var node = graph.Elements.Nodes.FirstOrDefault(n => n.Id == "myNode");
// Legacy properties still work but show deprecation warnings
// graph.Nodes and graph.Edges are still available for backward compatibilityNotes
- The deprecated
NodesandEdgesproperties will continue to work and fireCollectionChangedevents - Internal synchronization ensures both APIs stay in sync
- This change prepares the architecture for FlowGraph.Pro features and custom element types
FlowGraph v0.3.7
New Features
- Comprehensive Diagnostics System - New
FlowGraph.Core.Diagnosticsnamespace - FlowCanvasSettings Integration - Easy configuration for diagnostics logging
- Full documentation at
docs/articles/diagnostics.md
FlowGraph v0.3.6
New Features
-
Custom Edge Renderers - Full extensibility API for custom edge visuals
IEdgeRendererinterface for creating custom edge representations (sequence messages, swimlane flows, etc.)EdgeRendererRegistrywith wildcard pattern matching (e.g.,sequence-*matchessequence-message)EdgeRenderContextprovides source/target nodes, coordinates, theme, and scaleEdgeRenderResultreturns visible path, hit area, markers, labels, and additional visuals- Access via
canvas.EdgeRenderers.Register("my-edge-type", myRenderer)
-
Custom Background Renderers - Extensibility API for custom background layers
IBackgroundRendererinterface for rendering behind graph content (lifelines, swimlane lanes, etc.)BackgroundRendererRegistrysupports multiple concurrent renderers or single-renderer modeBackgroundRenderContextprovides viewport bounds, pan/zoom state, and coordinate transforms- Callbacks for
OnGraphChangedandOnViewportChangedfor efficient updates - Access via
canvas.BackgroundRenderers.Add(myRenderer)orcanvas.BackgroundRenderers.SetSingle(myRenderer)
API Additions
FlowCanvas.EdgeRenderersproperty for registering custom edge typesFlowCanvas.BackgroundRenderersproperty for registering custom backgrounds- Custom renderers are fully integrated into the FlowCanvas render pipeline
FlowGraph v0.3.5
Bug Fixes
- Fixed Node Selection Flakiness - Visual tree hit testing now correctly walks up parent hierarchy to find nodes when clicking on nested child elements (labels, inner grids, etc.)
- Fixed Settings Propagation -
FlowCanvasSettingschanges now properly propagate to all rendering components at runtime:- Added
UpdateSettings()methods toRenderContext,GraphRenderModel,NodeVisualManager,GraphRenderer,ViewportState,GridRenderer,InputStateContext, andDirectGraphRenderer - Settings changes via property binding now trigger full component updates
- Added
- Fixed DirectGraphRenderer Settings Sync - Direct rendering mode now correctly updates its internal
GraphRenderModelwhen settings change, fixing spatial index/hit testing mismatches
Improvements
- Enhanced debug logging for input hit testing diagnostics
FlowGraph v0.3.3
New Features
- Custom Port Renderers - Full extensibility API for custom port visuals
IPortRendererinterface for creating custom port shapes and stylesPortRendererRegistryto map port types to custom renderersDefaultPortRenderermaintains backward compatibility with standard circular portsPortRenderContextprovides port metadata, position, and theme resourcesPortVisualStateenum for hover, connected, and dragging states- Access via
canvas.GraphRenderer.PortRenderers.Register("MyType", myRenderer)
Documentation
- Added Custom Port Renderers section to README features
- New custom-ports.md guide in documentation
FlowGraph v0.3.2
New Features
- LabelInfo for Edge Labels - Enhanced edge label positioning with anchor points and offsets
LabelAnchor.Start- Position label at ~25% along edge (near source)LabelAnchor.Center- Position label at midpoint (default)LabelAnchor.End- Position label at ~75% along edge (near target)- Custom
OffsetXandOffsetYfor fine-tuning label position - Fluent API:
edge.Definition.WithLabelInfo("Label", LabelAnchor.Start, offsetY: -10) - Full JSON serialization support via
LabelInfoDto
Documentation
- Added Edge Label Positioning section to README
- Updated edge-routing.md with LabelInfo documentation
- Added tables documenting LabelAnchor positions and LabelInfo properties
FlowGraph v0.3.1
Documentation Updates
- Comprehensive API Documentation - Updated README and docs to reflect all v0.3.0 API changes
- Definition + State Pattern - Documented new immutable Definition + mutable State architecture
- Batch Loading Guide - Added documentation for
BeginBatchLoad(),EndBatchLoad(), and bulk operations - Performance Guide - New comprehensive guide for optimizing large graphs (virtualization, simplified rendering, direct GPU rendering)
- Enhanced Configuration - Documented all new FlowCanvasSettings properties
- Connection Validation - Updated with new built-in validators and composite patterns
- Events Documentation - Updated event examples with correct property names and new events
- Edge Routing Guide - Updated with new routing API and configuration options
FlowGraph v0.3.0
API Improvements
- Definition + State pattern for cleaner separation of concerns
NodeDefinitionandNodeStatefor immutable/mutable propertiesEdgeDefinitionandEdgeStatefor better edge managementPortDefinitionwith new properties (MaxConnections,IsRequired)BulkObservableCollectionwithAddRange()for batch operations- Improved connection validation with built-in validators
- Enhanced performance settings for large graphs (500+ nodes)
Breaking Changes
- Node and Edge constructors now accept Definition and State parameters (backward-compatible pass-through properties maintained)
ValidationResultrenamed toConnectionValidationResultBoxSelectionModerenamed toSelectionMode- Event property names updated for consistency
FlowGraph v0.2.2
Improvements
- Fixed all compiler warnings (CS8601, CS8602, CS0108, CS0109)
- Improved null safety across codebase
- Renamed internal
FlowDirectionenum toEdgeFlowDirectionto avoid conflict withVisual.FlowDirection
FlowGraph v0.2.0
New Features
- FlowGraph.3D - New package for 3D rendering using OpenGL via Silk.NET
- Data Flow System - Real-time data propagation between connected nodes
- Interactive Node Renderers - Color picker, radio buttons, sliders with state persistence
- 3D Output Node - Demo showcasing data flow with 3D OpenGL visualization
Improvements
- State persistence across visual tree rebuilds (pan/zoom operations)
- Static registry pattern for control reuse
FlowGraph v0.1.0
The first public release of FlowGraph - a node-based graph editor for .NET and Avalonia.
Features
- Pan, zoom, and viewport controls
- Draggable, resizable nodes with custom renderers
- Multiple edge types (Bezier, Straight, Step, SmoothStep)
- Connection validation
- Undo/redo with full command history
- Copy, cut, paste, duplicate
- Node grouping with collapse/expand
- Minimap and controls
- Animations
- Theming support (light/dark)
- JSON serialization
Installation
dotnet add package FlowGraph.AvaloniaDocumentation
Requirements
- .NET 9.0+
- Avalonia 11.2+
MIT License - Prismify LLC