New to Telerik UI for WPFStart a free 30-day trial

Represents graph extensions.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

C#
public static class IGraphExtensions

Inheritance: objectIGraphExtensions

Methods

Calculates the enclosing bounds.

C#
public static Rect CalculateEnclosingBounds(this IGraph graph, bool includeShapes = true, bool includeConnections = true)
Parameters:graphIGraph

The graph.

includeShapesbool

If set to true shapes will be included in the bounds calculation.

includeConnectionsbool

If set to true connections will be included in the bounds calculation.

Returns:

Rect

Rectangle enclosing all items.

Gets all graph items - shapes and connections.

C#
public static IEnumerable<IDiagramItem> DiagramItems(this IGraph graph)
Parameters:graphIGraphReturns:

IEnumerable<IDiagramItem>

Gets the connections for shape.

C#
public static IEnumerable<IConnection> GetConnectionsForShape(this IGraph graph, IShape shape)
Parameters:graphIGraph

The diagram.

shapeIShape

The shape.

Returns:

IEnumerable<IConnection>

Gets the connections for shape.

C#
public static IEnumerable<IConnection> GetConnectionsForShapeRecursively(this IGraph graph, IShape shape)
Parameters:graphIGraph

The diagram.

shapeIShape

The shape.

Returns:

IEnumerable<IConnection>

Gets the connections in sub graph - collection of shapes.

C#
public static IEnumerable<IConnection> GetConnectionsInSubGraph(this IGraph graph, IEnumerable<IShape> shapes)
Parameters:graphIGraph

The graph.

shapesIEnumerable<IShape>

The shapes.

Returns:

IEnumerable<IConnection>

Gets the incoming connections for shape.

C#
public static IEnumerable<IConnection> GetIncomingConnectionsForShape(this IGraph graph, IShape shape)
Parameters:graphIGraph

The diagram.

shapeIShape

The shape.

Returns:

IEnumerable<IConnection>

Gets the outgoing connections for shape.

C#
public static IEnumerable<IConnection> GetOutgoingConnectionsForShape(this IGraph graph, IShape shape)
Parameters:graphIGraph

The diagram.

shapeIShape

The shape.

Returns:

IEnumerable<IConnection>