Class PortVisualState
- Namespace
- FlowGraph.Avalonia.Rendering.PortRenderers
- Assembly
- FlowGraph.Avalonia.dll
Represents the visual state of a port.
public record PortVisualState : IEquatable<PortVisualState>
- Inheritance
-
PortVisualState
- Implements
- Inherited Members
Properties
Change
The type of state change that just occurred, if any. Use this to trigger one-shot animations (e.g., ripple on connect).
public PortStateChange Change { get; init; }
Property Value
ConnectionCount
Number of edges connected to this port. Useful for showing connection count badges or varying visual intensity.
public int ConnectionCount { get; init; }
Property Value
Default
Default state instance.
public static PortVisualState Default { get; }
Property Value
ErrorMessage
Optional error message when HasError is true.
public string? ErrorMessage { get; init; }
Property Value
HasError
Whether the port has a validation error.
public bool HasError { get; init; }
Property Value
IsConnected
Whether the port has any connections.
public bool IsConnected { get; init; }
Property Value
IsDragging
Whether an edge is currently being dragged from this port.
public bool IsDragging { get; init; }
Property Value
IsHovered
Whether the port is currently being hovered.
public bool IsHovered { get; init; }
Property Value
IsReceivingData
Whether data is currently being received on this port (for input ports). Use this for data flow indicators/animations.
public bool IsReceivingData { get; init; }
Property Value
IsSendingData
Whether data is currently being sent from this port (for output ports). Use this for data flow indicators/animations.
public bool IsSendingData { get; init; }
Property Value
IsValidDropTarget
Whether the port is a valid drop target for a dragged connection.
public bool IsValidDropTarget { get; init; }