Table of Contents

Class LabelEditManager

Namespace
FlowGraph.Avalonia
Assembly
FlowGraph.Avalonia.dll

Manages inline label editing for nodes and edges. Supports both visual tree mode and direct rendering mode.

public class LabelEditManager
Inheritance
LabelEditManager
Inherited Members

Constructors

LabelEditManager(Func<Graph?>, Func<Canvas?>, Func<ViewportState>, Func<ThemeResources?>, Func<CanvasElementManager>, Func<DirectCanvasRenderer?>, Func<bool>, Action)

Creates a new label edit manager.

public LabelEditManager(Func<Graph?> getGraph, Func<Canvas?> getMainCanvas, Func<ViewportState> getViewport, Func<ThemeResources?> getTheme, Func<CanvasElementManager> getGraphRenderer, Func<DirectCanvasRenderer?> getDirectRenderer, Func<bool> getIsDirectRendering, Action renderEdges)

Parameters

getGraph Func<Graph>
getMainCanvas Func<Canvas>
getViewport Func<ViewportState>
getTheme Func<ThemeResources>
getGraphRenderer Func<CanvasElementManager>
getDirectRenderer Func<DirectCanvasRenderer>
getIsDirectRendering Func<bool>
renderEdges Action

Methods

BeginEditEdgeLabel(Edge)

Begins inline editing for an edge's label.

public bool BeginEditEdgeLabel(Edge edge)

Parameters

edge Edge

The edge to edit.

Returns

bool

True if editing started successfully.

BeginEditNodeLabel(Node)

Begins inline editing for a node's label.

public bool BeginEditNodeLabel(Node node)

Parameters

node Node

The node to edit.

Returns

bool

True if editing started successfully.

BeginEditShapeText(ShapeElement)

Begins inline editing for a shape's text (e.g., sticky notes).

public bool BeginEditShapeText(ShapeElement shape)

Parameters

shape ShapeElement

The shape to edit.

Returns

bool

True if editing started successfully.

EndEditNodeLabel(Node)

Ends inline editing for a node's label.

public void EndEditNodeLabel(Node node)

Parameters

node Node

The node being edited.

IsEditingNodeLabel(Node)

Gets whether a node is currently being edited.

public bool IsEditingNodeLabel(Node node)

Parameters

node Node

The node to check.

Returns

bool

True if the node is in edit mode.

IsEditingShape(ShapeElement)

Gets whether a shape is currently being edited.

public bool IsEditingShape(ShapeElement shape)

Parameters

shape ShapeElement

Returns

bool

Events

EdgeLabelCommitted

Event raised when an edge's label has been committed.

public event EventHandler<EdgeLabelCommittedEventArgs>? EdgeLabelCommitted

Event Type

EventHandler<EdgeLabelCommittedEventArgs>

NodeLabelCommitted

Event raised when a node's label has been committed.

public event EventHandler<NodeLabelCommittedEventArgs>? NodeLabelCommitted

Event Type

EventHandler<NodeLabelCommittedEventArgs>

ShapeTextCommitted

Event raised when a shape's text has been committed.

public event EventHandler<ShapeTextCommittedEventArgs>? ShapeTextCommitted

Event Type

EventHandler<ShapeTextCommittedEventArgs>