Class GraphGroupExtensions
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
graphGraphThe graph containing the group.
groupIdstringThe group ID.
paddingdouble?Padding around children. If null, uses the group's GroupPadding property or GroupPadding.
headerHeightdoubleHeight of group header. Defaults to GroupHeaderHeight.
defaultNodeWidthdoubleDefault node width. Defaults to NodeWidth.
defaultNodeHeightdoubleDefault node height. Defaults to NodeHeight.
Returns
GetAncestorGroups(Graph, Node)
Gets all ancestor group nodes for a node.
public static IEnumerable<Node> GetAncestorGroups(this Graph graph, Node node)
Parameters
Returns
GetEdgesCrossingGroup(Graph, string)
Gets all edges that cross a group boundary.
public static IEnumerable<Edge> GetEdgesCrossingGroup(this Graph graph, string groupId)
Parameters
Returns
GetEdgesInternalToGroup(Graph, string)
Gets all edges that are internal to a group.
public static IEnumerable<Edge> GetEdgesInternalToGroup(this Graph graph, string groupId)
Parameters
Returns
GetGroupChildren(Graph, string)
Gets all nodes that are children of the specified group.
public static IEnumerable<Node> GetGroupChildren(this Graph graph, string groupId)
Parameters
Returns
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
Returns
GetGroups(Graph)
Gets all group nodes in the graph.
public static IEnumerable<Node> GetGroups(this Graph graph)
Parameters
graphGraph
Returns
GetParentGroup(Graph, Node)
Gets the parent group node for a node, if any.
public static Node? GetParentGroup(this Graph graph, Node node)
Parameters
Returns
GetTopLevelNodes(Graph)
Gets top-level nodes (nodes without a parent group).
public static IEnumerable<Node> GetTopLevelNodes(this Graph graph)
Parameters
graphGraph
Returns
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
Returns
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
Returns
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)