Table of Contents

Class GraphGroupExtensions

Namespace
FlowGraph.Core
Assembly
FlowGraph.Core.dll

Extension methods for working with node groups in a graph.

public static class GraphGroupExtensions
Inheritance
GraphGroupExtensions
Inherited Members

Methods

CalculateGroupBounds(Graph, string, double?, double, double, double)

Calculates the bounding box of a group based on its children.

public static (Point topLeft, double width, double height) CalculateGroupBounds(this Graph graph, string groupId, double? padding = null, double headerHeight = 30, double defaultNodeWidth = 150, double defaultNodeHeight = 80)

Parameters

graph Graph

The graph containing the group.

groupId string

The group ID.

padding double?

Padding around children. If null, uses the group's GroupPadding property or GroupPadding.

headerHeight double

Height of group header. Defaults to GroupHeaderHeight.

defaultNodeWidth double

Default node width. Defaults to NodeWidth.

defaultNodeHeight double

Default node height. Defaults to NodeHeight.

Returns

(Point topLeft, double width, double height)

GetAncestorGroups(Graph, Node)

Gets all ancestor group nodes for a node.

public static IEnumerable<Node> GetAncestorGroups(this Graph graph, Node node)

Parameters

graph Graph
node Node

Returns

IEnumerable<Node>

GetEdgesCrossingGroup(Graph, string)

Gets all edges that cross a group boundary.

public static IEnumerable<Edge> GetEdgesCrossingGroup(this Graph graph, string groupId)

Parameters

graph Graph
groupId string

Returns

IEnumerable<Edge>

GetEdgesInternalToGroup(Graph, string)

Gets all edges that are internal to a group.

public static IEnumerable<Edge> GetEdgesInternalToGroup(this Graph graph, string groupId)

Parameters

graph Graph
groupId string

Returns

IEnumerable<Edge>

GetGroupChildren(Graph, string)

Gets all nodes that are children of the specified group.

public static IEnumerable<Node> GetGroupChildren(this Graph graph, string groupId)

Parameters

graph Graph
groupId string

Returns

IEnumerable<Node>

GetGroupChildrenRecursive(Graph, string)

Gets all nodes that are children of the specified group, recursively.

public static IEnumerable<Node> GetGroupChildrenRecursive(this Graph graph, string groupId)

Parameters

graph Graph
groupId string

Returns

IEnumerable<Node>

GetGroups(Graph)

Gets all group nodes in the graph.

public static IEnumerable<Node> GetGroups(this Graph graph)

Parameters

graph Graph

Returns

IEnumerable<Node>

GetParentGroup(Graph, Node)

Gets the parent group node for a node, if any.

public static Node? GetParentGroup(this Graph graph, Node node)

Parameters

graph Graph
node Node

Returns

Node

GetTopLevelNodes(Graph)

Gets top-level nodes (nodes without a parent group).

public static IEnumerable<Node> GetTopLevelNodes(this Graph graph)

Parameters

graph Graph

Returns

IEnumerable<Node>

IsDescendantOf(Graph, Node, string)

Checks if a node is a descendant of a group.

public static bool IsDescendantOf(this Graph graph, Node node, string groupId)

Parameters

graph Graph
node Node
groupId string

Returns

bool

IsEdgeCrossingGroup(Graph, Edge, string)

Checks if an edge crosses a group boundary (one end inside, one outside).

public static bool IsEdgeCrossingGroup(this Graph graph, Edge edge, string groupId)

Parameters

graph Graph
edge Edge
groupId string

Returns

bool

IsEdgeInternalToGroup(Graph, Edge, string)

Checks if an edge is internal to a group (both endpoints in the same group).

public static bool IsEdgeInternalToGroup(this Graph graph, Edge edge, string groupId)

Parameters

graph Graph
edge Edge
groupId string

Returns

bool