Provides a hierarchic view over an IGraph.
Namespace: yWorks.yFiles.UI.ModelAssembly: yWorks.yFilesWPF.Viewer (in yWorks.yFilesWPF.Viewer.dll) Version: 2.2.0.2 (2.2.0.2)
Syntax
| C# |
|---|
public interface IGroupedGraph |
| Visual Basic |
|---|
Public Interface IGroupedGraph |
Remarks
The Nodes in a graph can be put into a hierarchical relationship.
This interface provides access to the Hierarchy of the nodes and offers methods
to modify the graph's node hierarchy.
An implementation of this interface can be queried from DefaultGraph's Lookup(Type) method, if
GroupingSupported is set to trueTruetruetrue (True in Visual Basic).
CopyC#
Examples
IGraph graph = GraphControl.Graph; // Turn on grouping support in DefaultGraph. DefaultGraph defaultGraph = graph.Get<DefaultGraph>(); if (defaultGraph != null) { defaultGraph.GroupingSupported = true; } // Use the grouping support. IGroupedGraph grouped = graph.GetGroupedGraph(); if (grouped != null) { grouped.GroupNodeDefaults.Style = new ShapeNodeStyle(ShapeNodeShape.RoundRectangle, Pens.Aquamarine, null); INode groupNode = grouped.CreateGroupNode(); grouped.GroupNodes(groupNode, new INode[] { node1, node2, node3 }); }