Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Type Parameters:
TNodeData
TLinkData
Syntax:
public sealed class DiagramToGraphAdapter<TNodeData, TLinkData> where TNodeData : new() where TLinkData : new()
Inheritance: objectDiagramToGraphAdapter<TNodeData, TLinkData>
Constructors
Initializes a new instance of the DiagramToGraphAdapter<TNodeData, TLinkData> class.
public DiagramToGraphAdapter()
Initializes a new instance of the DiagramToGraphAdapter<TNodeData, TLinkData> class.
public DiagramToGraphAdapter(IGraph diagramControl, bool ignoreInvisible = true, bool ignoreContainers = false)
The diagram control which should be mapped to its graph-analytical analog.
ignoreInvisibleboolIf set to true shapes with Visibility not set to Visible will be ignored.
If set to true shape containers will not be taken into account and all children inside a (possibly nested) container will be organized independently of their parent container as part of the global layout.
Properties
Gets the connections which are being ignored because of graph analytical reasons.
public IList<IConnection> IgnoredConnections { get; }
Gets the shapes which are being ignored because of graph analytical reasons. Ignored shapes are not mapped to a Node<TNodeData, TLinkData>.
public IList<IShape> IgnoredShapes { get; }
Gets the collection of Edge<TNodeData, TLinkData> items corresponding to the Connections items.
public IList<Edge<TNodeData, TLinkData>> Links { get; }
Note that the this collection can be a reduced set of the original Connections set. The omitted items can be found in the IgnoredConnections collection.
Methods
Converts the given diagram to a Graph<TNodeData, TLinkData>.
public void Convert(IGraph diagram, bool ignoreInvisible = true, bool ignoreContainers = false)
The diagram from which graph analytical information should be extracted.
ignoreInvisibleboolIf set to true shapes with Visibility not set to Visible will be ignored.
If set to true shape containers will not be taken into account and all children inside a (possibly nested) container will be organized independently of their parent container as part of the global layout.
Maps the specified connection to an edge of the graph deduced from the given diagram.
public Edge<TNodeData, TLinkData> Map(IConnection connection)
The connection.
Returns:Edge<TNodeData, TLinkData>