A CopiedLayoutGraph variant that can be initialized using an IGraph.
Namespace: yWorks.yFiles.UI.ModelAssembly: yWorks.yFilesNET.Adapter (in yWorks.yFilesNET.Adapter.dll) Version: 4.1.0.1 (4.1.0.1)
Syntax
| C# |
|---|
public class CopiedLayoutIGraph : CopiedLayoutGraph |
| Visual Basic |
|---|
Public Class CopiedLayoutIGraph _ Inherits CopiedLayoutGraph |
Remarks
Using this class, the various layout algorithms can be used to calculate an automatic layout
for an IGraph:
CopyC#
which makes use of an extension method and is identical to this:
CopyC#
which is basically the same as writing:
CopyC#
For more control over the adapting process, see the LayoutGraphAdapter class.
// graph is of type yWorks.yFiles.UI.Model.IGraph // and layouter is of type yWorks.yFiles.Layout.ILayouter graph.ApplyLayout(layouter);
// graph is of type yWorks.yFiles.UI.Model.IGraph // and layouter is of type yWorks.yFiles.Layout.ILayouter CopiedLayoutIGraph.ApplyLayout(graph, layouter);
// build the adapter copy, graph is of type yWorks.yFiles.UI.Model.IGraph CopiedLayoutIGraph copy = new CopiedLayoutIGraph(graph); // perform the layout on the copy - layouter is of type yWorks.yFiles.Layout.ILayouter layouter.DoLayout(copy); // apply the results to the original IGraph copy.CommitLayoutToOriginalGraph();
Related Demo Applications
Inheritance Hierarchy
System..::..Object
yWorks.yFiles.Algorithms..::..Graph
yWorks.yFiles.Layout..::..LayoutGraph
yWorks.yFiles.Layout..::..CopiedLayoutGraph
yWorks.yFiles.UI.Model..::..CopiedLayoutIGraph
yWorks.yFiles.Algorithms..::..Graph
yWorks.yFiles.Layout..::..LayoutGraph
yWorks.yFiles.Layout..::..CopiedLayoutGraph
yWorks.yFiles.UI.Model..::..CopiedLayoutIGraph