A CopiedLayoutGraph variant that can be initialized using an IGraph.

Namespace: yWorks.yFiles.UI.Model
Assembly: yWorks.yFilesSilverlight.Adapter (in yWorks.yFilesSilverlight.Adapter.dll) Version: 2.4.0.0

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#
// graph is of type yWorks.yFiles.UI.Model.IGraph
// and layouter is of type yWorks.yFiles.Layout.ILayouter
graph.ApplyLayout(layouter);
which makes use of an extension method and is identical to this:
CopyC#
// graph is of type yWorks.yFiles.UI.Model.IGraph
// and layouter is of type yWorks.yFiles.Layout.ILayouter
CopiedLayoutIGraph.ApplyLayout(graph, layouter);
which is basically the same as writing:
CopyC#
// 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();
For more control over the adapting process, see the LayoutGraphAdapter class.

Related Demo Applications

The following programming samples are available: Also see the yFiles for Silverlight tutorials for step by step introductions.

Inheritance Hierarchy

System..::..Object
  yWorks.yFiles.Algorithms..::..Graph
    yWorks.yFiles.Layout..::..LayoutGraph
      yWorks.yFiles.Layout..::..CopiedLayoutGraph
        yWorks.yFiles.UI.Model..::..CopiedLayoutIGraph

See Also