Table of Contents

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

PortStateChange

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

int

Default

Default state instance.

public static PortVisualState Default { get; }

Property Value

PortVisualState

ErrorMessage

Optional error message when HasError is true.

public string? ErrorMessage { get; init; }

Property Value

string

HasError

Whether the port has a validation error.

public bool HasError { get; init; }

Property Value

bool

IsConnected

Whether the port has any connections.

public bool IsConnected { get; init; }

Property Value

bool

IsDragging

Whether an edge is currently being dragged from this port.

public bool IsDragging { get; init; }

Property Value

bool

IsHovered

Whether the port is currently being hovered.

public bool IsHovered { get; init; }

Property Value

bool

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

bool

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

bool

IsValidDropTarget

Whether the port is a valid drop target for a dragged connection.

public bool IsValidDropTarget { get; init; }

Property Value

bool