ClassDiagramToGraphAdapter<TNodeData, TLinkData>
Helper class to extract a Graph<TNodeData, TLinkData> from an IGraph structure (usually the RadDiagram control).
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
DiagramToGraphAdapter()
Initializes a new instance of the DiagramToGraphAdapter<TNodeData, TLinkData> class.
Declaration
public DiagramToGraphAdapter()
DiagramToGraphAdapter(IGraph, bool, bool)
Initializes a new instance of the DiagramToGraphAdapter<TNodeData, TLinkData> class.
Declaration
public DiagramToGraphAdapter(IGraph diagramControl, bool ignoreInvisible = true, bool ignoreContainers = false)
Parameters
diagramControl
The diagram control which should be mapped to its graph-analytical analog.
ignoreInvisible
If set to true shapes with Visibility not set to Visible will be ignored.
ignoreContainers
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
IgnoredConnections
Gets the connections which are being ignored because of graph analytical reasons.
Declaration
public IList<IConnection> IgnoredConnections { get; }
Property Value
IgnoredShapes
Gets the shapes which are being ignored because of graph analytical reasons. Ignored shapes are not mapped to a Node<TNodeData, TLinkData>.
Links
Gets the collection of Edge<TNodeData, TLinkData> items corresponding to the Connections items.
Declaration
[SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public IList<Edge<TNodeData, TLinkData>> Links { get; }
Property Value
Remarks
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
Convert(IGraph, bool, bool)
Converts the given diagram to a Graph<TNodeData, TLinkData>.
Declaration
public void Convert(IGraph diagram, bool ignoreInvisible = true, bool ignoreContainers = false)
Parameters
diagram
The diagram from which graph analytical information should be extracted.
ignoreInvisible
If set to true shapes with Visibility not set to Visible will be ignored.
ignoreContainers
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.
Map(IConnection)
Maps the specified connection to an edge of the graph deduced from the given diagram.
Declaration
public Edge<TNodeData, TLinkData> Map(IConnection connection)
Parameters
connection
The connection.
Returns
Edge<TNodeData, TLinkData>
Map(IShape)
Maps the specified shape to a node of the graph deduced from the given diagram.