This class adds folding support to IGraph implementations on top of the IGroupedGraph interface.

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


public class FoldingManager
Visual Basic
Public Class FoldingManager


This implementation manages the varying states nodes and edges can have in different views and during different collapsed/expanded states of the nodes. Create an instance of this class for a given IGraph and use the CreateManagedView(INode, Predicate<(Of <<'(INode>)>>)) methods to create an IGraph implementation that provides a view of a subset of the graph, where group nodes can be collapsed and expanded.
GraphControl graphControl = new GraphControl();
graphControl.Graph = new FoldingManager().CreateManagedView().Graph;
graphControl.InputMode = new GraphEditorInputMode();
This class can be used to create managed views of the MasterGraph, where group nodes can appear as collapsed group nodes with their contents hidden. Edges that connect to elements inside collapsed group nodes can be configured to be represented by dummy edges in the views. The process of converting one or more true edges from the MasterGraph to zero or more dummy edges can be customized, as well as the process of converting an expanded group node to a collapsed group node.

Related Reading in the Developer's Guide

Class FoldingManager's central role for folding support is discussed in the section Folding Characteristics. A brief description of the class's API, set-up, etc. is given in the section Class FoldingManager.

Related Demo Applications

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

Inheritance Hierarchy


See Also