Assembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version: 184.108.40.206
This interface can be used to query structural information, it also offers methods that change the structure of the graph and its attributes. A number of events will trigger appropriate events if the structure of the graph changes.
The graph is made up of collections of nodes and edges. Each node and edge can be associated with a number of labels and possibly ports to which edges connect. An edge connects to two ports and may consist of zero or more bends. The graph is treated as a directed graph, i.e. edges have a source port and a target port. It is up to the algorithms and the visualization to possibly treat them as undirected.
Each element in the graph can be associated with a visual style that is used for the visualization of the element. Styles can be shared between multiple instances.
To associate data with the elements in the graph, code can make use of the Tag property that all IModelItems provide. In order to associate more than one data element with the graph items, compound data objects can be used. Alternatively the IMapperRegistry that can be obtained from the MapperRegistry property can be used to associate arbitrary data sets with the items in this graph.
This interface contains core methods that may use complicated argument lists. GraphExtensions is a static utility class that contains for this interface that improve the usability of this interface dramatically.
This interface provides a number of events that can be used to get notified for changes in the graph structure. These events are raised whenever the corresponding state change occurs, e.g. also when loading the graph from a file. If you are only interested in changes that are triggered interactively, you should subscribe to the corresponding events on the IInputMode implementations that implement the user interaction. Especially, you may not modify the graph structure in handlers for these event, e.g. try to prevent or undo the change that has raised the event.