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.Model
Assembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version: 2.4.0.0

Syntax

C#
public interface IFoldedGraph : ILookup, INotifyPropertyChanged
Visual Basic
Public Interface IFoldedGraph _ Inherits ILookup, INotifyPropertyChanged

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#
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();
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.

Related Reading in the Developer's Guide

A brief description of the interface's API and some usage aspects is given in the section Class IFoldedGraph. Class FoldingManager's central role for folding support in general is discussed in the section Folding Characteristics.

See Also