Central implementation of the IGraph interface.

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


public class DefaultGraph : IGraph, ILookup
Visual Basic
Public Class DefaultGraph _ Implements IGraph, ILookup


This class uses an instance of IGraphStructure to delegate the actual work of holding the structure of the graph to. This implementation deals with the proper firing of events and handling of default values.
This implementation has inherent support for undoability. If the UndoEngineEnabled property is set to trueTruetruetrue (True in Visual Basic), changes to the structure of the graph will automatically be recorded using the UndoEngine instance that can be queried from this instance's Lookup(Type) method. Clients that wish to enqueue custom undo events or that need to make non-structural changes to the graph can use the IUndoSupport implementation to do so. An implementation of this interface can also be queried using the ILookup method of this instance. Also there is an implementation of IGraphUndoUnitSupport in the lookup that will be used by this instance to create the actual undo units for structural changes in the graph's structure. If clients need to customize these events, they can decorate the lookup of this instance and wrap the provided implementation.
Using this IGraph implementation with its default internal IGraphStructure implementation also adds the following instances to its Lookup(Type):
Finally this implementation offers convenient support to enable support for grouped graphs.

Related Reading in the Developer's Guide

DefaultGraph is described in the section Class DefaultGraph.

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