Class EdgeVisualManager
Manages rendering and tracking of edge visuals including paths, markers, and labels. Responsible for creating, updating, and removing edge UI elements.
public class EdgeVisualManager
- Inheritance
-
EdgeVisualManager
- Inherited Members
Constructors
EdgeVisualManager(RenderContext, NodeVisualManager, EdgeRendererRegistry?)
Creates a new edge visual manager.
public EdgeVisualManager(RenderContext renderContext, NodeVisualManager nodeVisualManager, EdgeRendererRegistry? edgeRendererRegistry = null)
Parameters
renderContextRenderContextShared render context.
nodeVisualManagerNodeVisualManagerNode visual manager for port position calculations.
edgeRendererRegistryEdgeRendererRegistryOptional registry for custom edge renderers.
Methods
Clear()
Clears all tracked edge visuals. Note: This does not remove them from the canvas.
public void Clear()
GetEdgeEndpointHandles(string)
Gets the endpoint handles for an edge.
public (Ellipse? source, Ellipse? target) GetEdgeEndpointHandles(string edgeId)
Parameters
edgeIdstringThe edge ID.
Returns
GetEdgeGlowPath(string)
Gets the glow path for an edge.
public Path? GetEdgeGlowPath(string edgeId)
Parameters
edgeIdstringThe edge ID.
Returns
- Path
The edge's glow path, or null if not found.
GetEdgeLabel(string)
Gets the label for an edge.
public TextBlock? GetEdgeLabel(string edgeId)
Parameters
edgeIdstringThe edge ID.
Returns
- TextBlock
The edge's label, or null if not found.
GetEdgeMarkers(string)
Gets the markers (arrows) for an edge.
public IReadOnlyList<Path>? GetEdgeMarkers(string edgeId)
Parameters
edgeIdstringThe edge ID.
Returns
- IReadOnlyList<Path>
The edge's markers, or null if not found.
GetEdgeVisiblePath(string)
Gets the visible path for an edge.
public Path? GetEdgeVisiblePath(string edgeId)
Parameters
edgeIdstringThe edge ID.
Returns
- Path
The edge's visible path, or null if not found.
GetEdgeVisual(string)
Gets the hit area path for an edge.
public Path? GetEdgeVisual(string edgeId)
Parameters
edgeIdstringThe edge ID.
Returns
- Path
The edge's hit area path, or null if not found.
HasEdgeVisual(string)
Checks if an edge visual exists in tracking.
public bool HasEdgeVisual(string edgeId)
Parameters
edgeIdstringThe edge ID to check.
Returns
- bool
True if the edge visual exists.
RemoveEdgeVisual(Canvas, Edge)
Removes an edge visual and all its components from the canvas and tracking.
public bool RemoveEdgeVisual(Canvas canvas, Edge edge)
Parameters
canvasCanvasThe canvas containing the visual.
edgeEdgeThe edge to remove.
Returns
- bool
True if the visual was found and removed.
RenderEdge(Canvas, Edge, Graph, ThemeResources)
Renders a single edge with its markers and optional label.
public Path? RenderEdge(Canvas canvas, Edge edge, Graph graph, ThemeResources theme)
Parameters
canvasCanvasThe canvas to render to.
edgeEdgeThe edge to render.
graphGraphThe graph containing the edge.
themeThemeResourcesTheme resources for styling.
Returns
- Path
The created hit area path, or null if rendering failed.
RenderEdges(Canvas, Graph, ThemeResources, Path?)
Renders all edges in the graph to the canvas.
public void RenderEdges(Canvas canvas, Graph graph, ThemeResources theme, Path? excludePath = null)
Parameters
canvasCanvasThe canvas to render to.
graphGraphThe graph containing edges.
themeThemeResourcesTheme resources for styling.
excludePathPathOptional path to exclude from cleanup.
UpdateEdgeSelection(Edge, ThemeResources)
Updates the selection visual state of an edge. Uses logical (unscaled) dimensions - MatrixTransform handles zoom.
public void UpdateEdgeSelection(Edge edge, ThemeResources theme)
Parameters
edgeEdgeThe edge to update.
themeThemeResourcesTheme resources for styling.