Class LabelEditManager
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
getGraphFunc<Graph>getMainCanvasFunc<Canvas>getViewportFunc<ViewportState>getThemeFunc<ThemeResources>getGraphRendererFunc<CanvasElementManager>getDirectRendererFunc<DirectCanvasRenderer>getIsDirectRenderingFunc<bool>renderEdgesAction
Methods
BeginEditEdgeLabel(Edge)
Begins inline editing for an edge's label.
public bool BeginEditEdgeLabel(Edge edge)
Parameters
edgeEdgeThe 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
nodeNodeThe 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
shapeShapeElementThe 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
nodeNodeThe node being edited.
IsEditingNodeLabel(Node)
Gets whether a node is currently being edited.
public bool IsEditingNodeLabel(Node node)
Parameters
nodeNodeThe 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
shapeShapeElement
Returns
Events
EdgeLabelCommitted
Event raised when an edge's label has been committed.
public event EventHandler<EdgeLabelCommittedEventArgs>? EdgeLabelCommitted
Event Type
NodeLabelCommitted
Event raised when a node's label has been committed.
public event EventHandler<NodeLabelCommittedEventArgs>? NodeLabelCommitted
Event Type
ShapeTextCommitted
Event raised when a shape's text has been committed.
public event EventHandler<ShapeTextCommittedEventArgs>? ShapeTextCommitted