Interface that is used for manipulating a managed view
of an IGraph that supports folding operations like expanding and
collapsing of nodes.
Namespace: yWorks.yFiles.UI.ModelAssembly: yWorks.yFilesNET.Viewer (in yWorks.yFilesNET.Viewer.dll) Version: 4.1.0.1 (4.1.0.1)
Syntax
Remarks
The FoldingManager creates views of a MasterGraph and
MasterHierarchy which are created using copies of the original "master" entities.
The views are being synchronized via the MasterGraph, but may contain additional
view state.
Typically nodes and edges are being copied from the MasterGraph and they share
many of their properties by reference (e.g. Style).
However if group nodes are being represented by collapsed group nodes in this view,
they maintain a separate set of labels, ports, bends,
and geometry. This view-local state is shared between all views
that have been created by the same
Manager and can be obtained and modified via the
FoldingManager's GetViewState methods for dummy edges
and dummy nodes in the absence of a corresponding IFoldedGraph
view instance.
Developers typically don't need to implement this interface themselves, rather an implementation is provided by the framework
and can be obtained from the FoldingManager.
Use CreateManagedView()()()() to obtain an IGraph implementation
that contains an implementation of this class in its Lookup(Type) method:
CopyC#
This interface extends the INotifyPropertyChanged interface.
This can be used to easily monitor the validity of this view.
Also changes to the LocalRoot property will be published via this event.
FoldingManager manager = new FoldingManager(); IFoldedGraph foldedGraph = manager.CreateManagedView(); IGraph graph = foldedGraph.Graph; // obtain the foldedGraph instance using the lookup, this // will yield the same instance as above but can be used // at other places in the code that have access to the graph // instance, only. foldedGraph = graph.GetFoldedGraph();