Show / Hide Table of Contents

Class GraphLayout<TVertex, TEdge, TGraph>

Graph layout control. Support layout, edge routing and overlap removal algorithms, with multiple layout states.

Inheritance
System.Object
GraphCanvas
GraphLayout<TVertex, TEdge, TGraph>
ContextualGraphLayout<TVertex, TEdge, TGraph>
GraphLayout
Inherited Members
GraphCanvas.XProperty
GraphCanvas.YProperty
GraphCanvas.GetX(DependencyObject)
GraphCanvas.SetX(DependencyObject, Double)
GraphCanvas.GetY(DependencyObject)
GraphCanvas.SetY(DependencyObject, Double)
GraphCanvas.PositionChangedEvent
GraphCanvas.AddPositionChangedHandler(DependencyObject, RoutedEventHandler)
GraphCanvas.RemovePositionChangedHandler(DependencyObject, RoutedEventHandler)
GraphCanvas.AnimationLength
GraphCanvas.AnimationLengthProperty
GraphCanvas.CreationTransition
GraphCanvas.CreationTransitionProperty
GraphCanvas.IsAnimationEnabled
GraphCanvas.IsAnimationEnabledProperty
GraphCanvas.MoveAnimation
GraphCanvas.MoveAnimationProperty
GraphCanvas.DestructionTransition
GraphCanvas.DestructionTransitionProperty
GraphCanvas.Origo
GraphCanvas.OrigoProperty
GraphCanvas.Translation
GraphCanvas.TranslationPropertyKey
GraphCanvas.TranslationProperty
GraphCanvas.ArrangeOverride(System.Windows.Size)
GraphCanvas.MeasureOverride(System.Windows.Size)
GraphCanvas.AnimationContext
GraphCanvas.RunCreationTransition(Control)
GraphCanvas.RunMoveAnimation(Control, Double, Double)
GraphCanvas.RunDestructionTransition(Control, Boolean)
Namespace: GraphShape.Controls
Assembly: GraphShape.Controls.dll
Syntax
public class GraphLayout<TVertex, TEdge, TGraph> : GraphCanvas where TVertex : class where TEdge : IEdge<TVertex> where TGraph : class, IBidirectionalGraph<TVertex, TEdge>
Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

TGraph

Graph type.

Constructors

| Improve this Doc View Source

GraphLayout()

Initializes a new instance of the GraphLayout class.

Declaration
public GraphLayout()

Fields

| Improve this Doc View Source

AnimationDisablerEdgeCountProperty

Animation disabler via edge count dependency property.

Declaration
public static readonly DependencyProperty AnimationDisablerEdgeCountProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

AnimationDisablerVertexCountProperty

Animation disabler via vertex count dependency property.

Declaration
public static readonly DependencyProperty AnimationDisablerVertexCountProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

AsyncComputeProperty

Async computing dependency property.

Declaration
public static readonly DependencyProperty AsyncComputeProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

EdgeRoutingAlgorithmFactoryProperty

Edge routing algorithm factory dependency property.

Declaration
public static readonly DependencyProperty EdgeRoutingAlgorithmFactoryProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

EdgeRoutingAlgorithmProperty

Edge routing algorithm dependency property.

Declaration
public static readonly DependencyProperty EdgeRoutingAlgorithmProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

EdgeRoutingAlgorithmPropertyKey

Edge routing algorithm property key.

Declaration
protected static readonly DependencyPropertyKey EdgeRoutingAlgorithmPropertyKey
Field Value
Type Description
DependencyPropertyKey
| Improve this Doc View Source

EdgeRoutingAlgorithmTypeProperty

Edge routing algorithm type dependency property.

Declaration
public static readonly DependencyProperty EdgeRoutingAlgorithmTypeProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

EdgeRoutingConstraintProperty

Edge routing constraint dependency property.

Declaration
public static readonly DependencyProperty EdgeRoutingConstraintProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

EdgeRoutingParametersProperty

Edge routing parameters dependency property.

Declaration
public static readonly DependencyProperty EdgeRoutingParametersProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

EdgesControls

Edges controls.

Declaration
protected readonly Dictionary<TEdge, EdgeControl> EdgesControls
Field Value
Type Description
Dictionary<TEdge, EdgeControl>
| Improve this Doc View Source

GraphProperty

Graph dependency property.

Declaration
public static readonly DependencyProperty GraphProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

HighlightAlgorithmFactoryProperty

Highlight algorithm factory dependency property.

Declaration
public static readonly DependencyProperty HighlightAlgorithmFactoryProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

HighlightAlgorithmProperty

Highlight algorithm dependency property.

Declaration
public static readonly DependencyProperty HighlightAlgorithmProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

HighlightAlgorithmPropertyKey

Highlight algorithm property key.

Declaration
protected static readonly DependencyPropertyKey HighlightAlgorithmPropertyKey
Field Value
Type Description
DependencyPropertyKey
| Improve this Doc View Source

HighlightAlgorithmTypeProperty

Highlight algorithm type dependency property.

Declaration
public static readonly DependencyProperty HighlightAlgorithmTypeProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

HighlightParametersProperty

Highlight parameters dependency property.

Declaration
public static readonly DependencyProperty HighlightParametersProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

LayoutAlgorithmFactoryProperty

Layout algorithm factory dependency property.

Declaration
public static readonly DependencyProperty LayoutAlgorithmFactoryProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

LayoutAlgorithmProperty

Layout algorithm dependency property.

Declaration
public static readonly DependencyProperty LayoutAlgorithmProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

LayoutAlgorithmPropertyKey

Layout algorithm property key.

Declaration
protected static readonly DependencyPropertyKey LayoutAlgorithmPropertyKey
Field Value
Type Description
DependencyPropertyKey
| Improve this Doc View Source

LayoutAlgorithmTypeProperty

Layout algorithm type dependency property.

Declaration
public static readonly DependencyProperty LayoutAlgorithmTypeProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

LayoutModeProperty

Layout mode dependency property.

Declaration
public static readonly DependencyProperty LayoutModeProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

LayoutParametersProperty

Layout parameters dependency property.

Declaration
public static readonly DependencyProperty LayoutParametersProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

LayoutStateProperty

Layout state dependency property.

Declaration
public static readonly DependencyProperty LayoutStateProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

LayoutStatePropertyKey

Layout state property key.

Declaration
protected static readonly DependencyPropertyKey LayoutStatePropertyKey
Field Value
Type Description
DependencyPropertyKey
| Improve this Doc View Source

LayoutStatusPercentProperty

Layout status percent dependency property.

Declaration
public static readonly DependencyProperty LayoutStatusPercentProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

LayoutStatusPercentPropertyKey

Layout status percent property key.

Declaration
protected static readonly DependencyPropertyKey LayoutStatusPercentPropertyKey
Field Value
Type Description
DependencyPropertyKey
| Improve this Doc View Source

OverlapRemovalAlgorithmFactoryProperty

Overlap removal algorithm factory dependency property.

Declaration
public static readonly DependencyProperty OverlapRemovalAlgorithmFactoryProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

OverlapRemovalAlgorithmProperty

Overlap removal algorithm factory dependency property.

Declaration
public static readonly DependencyProperty OverlapRemovalAlgorithmProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

OverlapRemovalAlgorithmPropertyKey

Overlap removal algorithm property key.

Declaration
protected static readonly DependencyPropertyKey OverlapRemovalAlgorithmPropertyKey
Field Value
Type Description
DependencyPropertyKey
| Improve this Doc View Source

OverlapRemovalAlgorithmTypeProperty

Overlap removal algorithm type dependency property.

Declaration
public static readonly DependencyProperty OverlapRemovalAlgorithmTypeProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

OverlapRemovalConstraintProperty

Overlap removal constraint dependency property.

Declaration
public static readonly DependencyProperty OverlapRemovalConstraintProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

OverlapRemovalParametersProperty

Overlap removal parameters dependency property.

Declaration
public static readonly DependencyProperty OverlapRemovalParametersProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

ShowAllStatesProperty

Show all states dependency property.

Declaration
public static readonly DependencyProperty ShowAllStatesProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

Sizes

Vertices sizes.

Declaration
protected IDictionary<TVertex, SizeF> Sizes
Field Value
Type Description
IDictionary<TVertex, SizeF>
| Improve this Doc View Source

StateCountProperty

Layout states count dependency property.

Declaration
public static readonly DependencyProperty StateCountProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

StateCountPropertyKey

Layout states count property key.

Declaration
protected static readonly DependencyPropertyKey StateCountPropertyKey
Field Value
Type Description
DependencyPropertyKey
| Improve this Doc View Source

StateIndexProperty

Index of the currently shown layout state dependency property.

Declaration
public static readonly DependencyProperty StateIndexProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

VerticesControls

Vertices controls.

Declaration
protected readonly Dictionary<TVertex, VertexControl> VerticesControls
Field Value
Type Description
Dictionary<TVertex, VertexControl>
| Improve this Doc View Source

Worker

Background worker to run layout algorithm.

Declaration
protected BackgroundWorker Worker
Field Value
Type Description
BackgroundWorker

Properties

| Improve this Doc View Source

ActualLayoutMode

Current .

Declaration
protected Algorithms.Layout.LayoutMode ActualLayoutMode { get; }
Property Value
Type Description
Algorithms.Layout.LayoutMode
| Improve this Doc View Source

AnimationDisablerEdgeCount

If the graph has more edge than this count, the animations will be disabled automatically.

Declaration
public int AnimationDisablerEdgeCount { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

AnimationDisablerVertexCount

If the graph has more vertex than this count, the animation will be disabled automatically.

Declaration
public int AnimationDisablerVertexCount { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

AsyncCompute

If this property is true the algorithm will be executed on a separate System.Threading.Thread.

Declaration
public bool AsyncCompute { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

CanAnimate

Gets whether the animation could be run, or not.

Declaration
public override bool CanAnimate { get; }
Property Value
Type Description
System.Boolean
Overrides
GraphCanvas.CanAnimate
| Improve this Doc View Source

CanLayout

Indicates if layout can be done.

Declaration
protected virtual bool CanLayout { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

EdgeRoutingAlgorithm

The algorithm used for the edge routing.

Declaration
public IEdgeRoutingAlgorithm<TVertex, TEdge, TGraph> EdgeRoutingAlgorithm { get; protected set; }
Property Value
Type Description
IEdgeRoutingAlgorithm<TVertex, TEdge, TGraph>
Remarks

It can be the same object as the LayoutAlgorithm, in this case the EdgeRoutingAlgorithm won't be run separately, the edge routing should be calculated in the LayoutAlgorithm.

| Improve this Doc View Source

EdgeRoutingAlgorithmFactory

Edge routing algorithm factory.

Declaration
public IEdgeRoutingAlgorithmFactory<TVertex, TEdge, TGraph> EdgeRoutingAlgorithmFactory { get; set; }
Property Value
Type Description
IEdgeRoutingAlgorithmFactory<TVertex, TEdge, TGraph>
| Improve this Doc View Source

EdgeRoutingAlgorithmType

Edge routing algorithm type.

Declaration
public string EdgeRoutingAlgorithmType { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

EdgeRoutingConstraint

Edge routing constraint.

Declaration
public AlgorithmConstraints EdgeRoutingConstraint { get; set; }
Property Value
Type Description
AlgorithmConstraints
| Improve this Doc View Source

EdgeRoutingParameters

Edge routing parameters.

Declaration
public IEdgeRoutingParameters EdgeRoutingParameters { get; set; }
Property Value
Type Description
IEdgeRoutingParameters
| Improve this Doc View Source

Graph

The graph we want to show.

Declaration
public TGraph Graph { get; set; }
Property Value
Type Description
TGraph
| Improve this Doc View Source

HighlightAlgorithm

Highlight algorithm.

Declaration
public IHighlightAlgorithm<TVertex, TEdge> HighlightAlgorithm { get; protected set; }
Property Value
Type Description
IHighlightAlgorithm<TVertex, TEdge>
| Improve this Doc View Source

HighlightAlgorithmFactory

Highlight algorithm factory.

Declaration
public IHighlightAlgorithmFactory<TVertex, TEdge, TGraph> HighlightAlgorithmFactory { get; set; }
Property Value
Type Description
IHighlightAlgorithmFactory<TVertex, TEdge, TGraph>
| Improve this Doc View Source

HighlightAlgorithmType

Highlight algorithm type.

Declaration
public string HighlightAlgorithmType { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

HighlightedEdges

Declaration
public IEnumerable<TEdge> HighlightedEdges { get; }
Property Value
Type Description
IEnumerable<TEdge>
| Improve this Doc View Source

HighlightedVertices

Declaration
public IEnumerable<TVertex> HighlightedVertices { get; }
Property Value
Type Description
IEnumerable<TVertex>
| Improve this Doc View Source

HighlightParameters

Highlight parameters.

Declaration
public IHighlightParameters HighlightParameters { get; set; }
Property Value
Type Description
IHighlightParameters
| Improve this Doc View Source

IsCompoundMode

Indicates if ActualLayoutMode is a mode.

Declaration
protected bool IsCompoundMode { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

LayoutAlgorithm

The algorithm which have been used/is running/will be executed.

Declaration
public ILayoutAlgorithm<TVertex, TEdge, TGraph> LayoutAlgorithm { get; protected set; }
Property Value
Type Description
ILayoutAlgorithm<TVertex, TEdge, TGraph>
| Improve this Doc View Source

LayoutAlgorithmFactory

Layout algorithm factory.

Declaration
public ILayoutAlgorithmFactory<TVertex, TEdge, TGraph> LayoutAlgorithmFactory { get; set; }
Property Value
Type Description
ILayoutAlgorithmFactory<TVertex, TEdge, TGraph>
| Improve this Doc View Source

LayoutAlgorithmType

Layout algorithm type.

Declaration
public string LayoutAlgorithmType { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

LayoutMode

Layout mode.

Declaration
public LayoutMode LayoutMode { get; set; }
Property Value
Type Description
LayoutMode
| Improve this Doc View Source

LayoutParameters

Layout parameters.

Declaration
public ILayoutParameters LayoutParameters { get; set; }
Property Value
Type Description
ILayoutParameters
| Improve this Doc View Source

LayoutState

Layout state.

Declaration
public LayoutState<TVertex, TEdge> LayoutState { get; protected set; }
Property Value
Type Description
LayoutState<TVertex, TEdge>
| Improve this Doc View Source

LayoutStatusPercent

Status of the layout process in percent.

Declaration
public double LayoutStatusPercent { get; protected set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

OverlapRemovalAlgorithm

Overlap removal algorithm.

Declaration
public IOverlapRemovalAlgorithm<TVertex> OverlapRemovalAlgorithm { get; protected set; }
Property Value
Type Description
IOverlapRemovalAlgorithm<TVertex>
| Improve this Doc View Source

OverlapRemovalAlgorithmFactory

Overlap removal algorithm factory.

Declaration
public IOverlapRemovalAlgorithmFactory<TVertex> OverlapRemovalAlgorithmFactory { get; set; }
Property Value
Type Description
IOverlapRemovalAlgorithmFactory<TVertex>
| Improve this Doc View Source

OverlapRemovalAlgorithmType

Overlap removal algorithm type.

Declaration
public string OverlapRemovalAlgorithmType { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

OverlapRemovalConstraint

Overlap removal constraint.

Declaration
public AlgorithmConstraints OverlapRemovalConstraint { get; set; }
Property Value
Type Description
AlgorithmConstraints
| Improve this Doc View Source

OverlapRemovalParameters

Overlap removal parameters.

Declaration
public IOverlapRemovalParameters OverlapRemovalParameters { get; set; }
Property Value
Type Description
IOverlapRemovalParameters
| Improve this Doc View Source

SemiHighlightedEdges

Declaration
public IEnumerable<TEdge> SemiHighlightedEdges { get; }
Property Value
Type Description
IEnumerable<TEdge>
| Improve this Doc View Source

SemiHighlightedVertices

Declaration
public IEnumerable<TVertex> SemiHighlightedVertices { get; }
Property Value
Type Description
IEnumerable<TVertex>
| Improve this Doc View Source

ShowAllStates

If true all states of the layout process will be stored, so you can "replay" the layout, otherwise only the start and end states will be stored.

Declaration
public bool ShowAllStates { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

StateCount

Number of layout states.

Declaration
public int StateCount { get; protected set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

StateIndex

Index of the currently shown layout state.

Declaration
public int StateIndex { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

VerticesSizes

Vertices sizes.

Declaration
protected IDictionary<TVertex, SizeF> VerticesSizes { get; }
Property Value
Type Description
IDictionary<TVertex, SizeF>

Methods

| Improve this Doc View Source

CancelLayout()

Cancels layout computing.

Declaration
public void CancelLayout()
| Improve this Doc View Source

ChangeState(Int32)

Changes which layout state should be shown.

Declaration
protected void ChangeState(int stateIndex)
Parameters
Type Name Description
System.Int32 stateIndex

The index of the shown layout state.

| Improve this Doc View Source

CoerceEdgeRoutingAlgorithmFactory(DependencyObject, Object)

Coerce callback of the EdgeRoutingAlgorithmFactoryProperty dependency property.

Declaration
protected static object CoerceEdgeRoutingAlgorithmFactory(DependencyObject d, object baseValue)
Parameters
Type Name Description
DependencyObject d
System.Object baseValue
Returns
Type Description
System.Object
| Improve this Doc View Source

CoerceHighlightAlgorithmFactory(DependencyObject, Object)

Coerce callback of the HighlightAlgorithmFactoryProperty dependency property.

Declaration
protected static object CoerceHighlightAlgorithmFactory(DependencyObject d, object baseValue)
Parameters
Type Name Description
DependencyObject d
System.Object baseValue
Returns
Type Description
System.Object
| Improve this Doc View Source

CoerceHighlightAlgorithmType(DependencyObject, Object)

Coerce callback of the HighlightAlgorithmTypeProperty dependency property.

Declaration
protected static object CoerceHighlightAlgorithmType(DependencyObject d, object baseValue)
Parameters
Type Name Description
DependencyObject d
System.Object baseValue
Returns
Type Description
System.Object
| Improve this Doc View Source

CoerceHighlightParameters(DependencyObject, Object)

Coerce callback of the HighlightParametersProperty dependency property.

Declaration
protected static object CoerceHighlightParameters(DependencyObject d, object baseValue)
Parameters
Type Name Description
DependencyObject d
System.Object baseValue
Returns
Type Description
System.Object
| Improve this Doc View Source

CoerceLayoutAlgorithmFactory(DependencyObject, Object)

Coerce callback of the LayoutAlgorithmFactoryProperty dependency property.

Declaration
protected static object CoerceLayoutAlgorithmFactory(DependencyObject d, object baseValue)
Parameters
Type Name Description
DependencyObject d
System.Object baseValue
Returns
Type Description
System.Object
| Improve this Doc View Source

CoerceOnLayoutMode(DependencyObject, Object)

Coerce callback of the LayoutMode dependency property.

Declaration
protected static object CoerceOnLayoutMode(DependencyObject d, object baseValue)
Parameters
Type Name Description
DependencyObject d
System.Object baseValue
Returns
Type Description
System.Object
| Improve this Doc View Source

CoerceOverlapRemovalAlgorithmFactory(DependencyObject, Object)

Coerce callback of the OverlapRemovalAlgorithmFactoryProperty dependency property.

Declaration
protected static object CoerceOverlapRemovalAlgorithmFactory(DependencyObject d, object baseValue)
Parameters
Type Name Description
DependencyObject d
System.Object baseValue
Returns
Type Description
System.Object
| Improve this Doc View Source

CoerceStateIndex(DependencyObject, Object)

Coerce Callback of the StateIndex dependency property.

Declaration
protected static object CoerceStateIndex(DependencyObject d, object baseValue)
Parameters
Type Name Description
DependencyObject d
System.Object baseValue
Returns
Type Description
System.Object

It coerces the value of the StateIndex between 0 and (StateCount-1).

| Improve this Doc View Source

ContinueLayout()

The layout process will be initialized with the current vertices positions.

Declaration
public override void ContinueLayout()
Overrides
GraphCanvas.ContinueLayout()
| Improve this Doc View Source

CreateEdgeControl(TEdge)

Creates a EdgeControl for the given edge.

Declaration
protected virtual EdgeControl CreateEdgeControl(TEdge edge)
Parameters
Type Name Description
TEdge edge

Graph edge.

Returns
Type Description
EdgeControl

A EdgeControl.

Exceptions
Type Condition
System.ArgumentNullException

edge is null.

| Improve this Doc View Source

CreateHighlightContext()

Creates a from given parameters.

Declaration
protected virtual IHighlightContext<TVertex, TEdge, TGraph> CreateHighlightContext()
Returns
Type Description
IHighlightContext<TVertex, TEdge, TGraph>

Created .

| Improve this Doc View Source

CreateLayoutContext(IDictionary<TVertex, Point>, IDictionary<TVertex, Size>)

Creates a from given parameters.

Declaration
protected virtual ILayoutContext<TVertex, TEdge, TGraph> CreateLayoutContext(IDictionary<TVertex, Point> positions, IDictionary<TVertex, Size> sizes)
Parameters
Type Name Description
IDictionary<TVertex, Point> positions

Vertices positions.

IDictionary<TVertex, Size> sizes

Vertices sizes.

Returns
Type Description
ILayoutContext<TVertex, TEdge, TGraph>

Created , null if CanLayout is false.

Exceptions
Type Condition
System.ArgumentNullException

sizes is null.

| Improve this Doc View Source

CreateOverlapRemovalContext(IDictionary<TVertex, Point>, IDictionary<TVertex, Size>)

Creates a from given parameters.

Declaration
protected virtual IOverlapRemovalContext<TVertex> CreateOverlapRemovalContext(IDictionary<TVertex, Point> positions, IDictionary<TVertex, Size> sizes)
Parameters
Type Name Description
IDictionary<TVertex, Point> positions

Vertices positions.

IDictionary<TVertex, Size> sizes

Vertices sizes.

Returns
Type Description
IOverlapRemovalContext<TVertex>

Created .

Exceptions
Type Condition
System.ArgumentNullException

positions is null.

System.ArgumentNullException

sizes is null.

| Improve this Doc View Source

CreateVertexControl(TVertex)

Creates a VertexControl for the given vertex.

Declaration
protected virtual VertexControl CreateVertexControl(TVertex vertex)
Parameters
Type Name Description
TVertex vertex

Graph vertex.

Returns
Type Description
VertexControl

A VertexControl.

Exceptions
Type Condition
System.ArgumentNullException

vertex is null.

| Improve this Doc View Source

GetEdgeControl(TEdge)

Gets the EdgeControl corresponding to the given edge.

Declaration
public EdgeControl GetEdgeControl(TEdge edge)
Parameters
Type Name Description
TEdge edge

Graph edge.

Returns
Type Description
EdgeControl

The corresponding EdgeControl, null otherwise.

Exceptions
Type Condition
System.ArgumentNullException

edge is null.

| Improve this Doc View Source

GetOrCreateEdgeControl(TEdge)

Gets or creates a EdgeControl for the given edge.

Declaration
protected EdgeControl GetOrCreateEdgeControl(TEdge edge)
Parameters
Type Name Description
TEdge edge

Graph edge.

Returns
Type Description
EdgeControl

A EdgeControl.

Exceptions
Type Condition
System.ArgumentNullException

edge is null.

| Improve this Doc View Source

GetOrCreateVertexControl(TVertex)

Gets or creates a VertexControl for the given vertex.

Declaration
protected VertexControl GetOrCreateVertexControl(TVertex vertex)
Parameters
Type Name Description
TVertex vertex

Graph vertex.

Returns
Type Description
VertexControl

A VertexControl.

Exceptions
Type Condition
System.ArgumentNullException

vertex is null.

| Improve this Doc View Source

GetVertexControl(TVertex)

Gets the VertexControl corresponding to the given vertex.

Declaration
public VertexControl GetVertexControl(TVertex vertex)
Parameters
Type Name Description
TVertex vertex

Graph vertex.

Returns
Type Description
VertexControl

The corresponding VertexControl, null otherwise.

Exceptions
Type Condition
System.ArgumentNullException

vertex is null.

| Improve this Doc View Source

HighlightEdge(TEdge, Object)

Declaration
public void HighlightEdge(TEdge edge, object highlightInfo)
Parameters
Type Name Description
TEdge edge
System.Object highlightInfo
| Improve this Doc View Source

HighlightVertex(TVertex, Object)

Declaration
public void HighlightVertex(TVertex vertex, object highlightInfo)
Parameters
Type Name Description
TVertex vertex
System.Object highlightInfo
| Improve this Doc View Source

InitializePosition(TVertex)

Initializes the position of the given vertex.

Declaration
protected virtual void InitializePosition(TVertex vertex)
Parameters
Type Name Description
TVertex vertex

Graph vertex.

Exceptions
Type Condition
System.ArgumentNullException

vertex is null.

| Improve this Doc View Source

IsHighlightedEdge(TEdge)

Declaration
public bool IsHighlightedEdge(TEdge edge)
Parameters
Type Name Description
TEdge edge
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsHighlightedEdge(TEdge, out Object)

Declaration
public bool IsHighlightedEdge(TEdge edge, out object highlightInfo)
Parameters
Type Name Description
TEdge edge
System.Object highlightInfo
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsHighlightedVertex(TVertex)

Declaration
public bool IsHighlightedVertex(TVertex vertex)
Parameters
Type Name Description
TVertex vertex
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsHighlightedVertex(TVertex, out Object)

Declaration
public bool IsHighlightedVertex(TVertex vertex, out object highlightInfo)
Parameters
Type Name Description
TVertex vertex
System.Object highlightInfo
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsSemiHighlightedEdge(TEdge)

Declaration
public bool IsSemiHighlightedEdge(TEdge edge)
Parameters
Type Name Description
TEdge edge
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsSemiHighlightedEdge(TEdge, out Object)

Declaration
public bool IsSemiHighlightedEdge(TEdge edge, out object semiHighlightInfo)
Parameters
Type Name Description
TEdge edge
System.Object semiHighlightInfo
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsSemiHighlightedVertex(TVertex)

Declaration
public bool IsSemiHighlightedVertex(TVertex vertex)
Parameters
Type Name Description
TVertex vertex
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsSemiHighlightedVertex(TVertex, out Object)

Declaration
public bool IsSemiHighlightedVertex(TVertex vertex, out object semiHighlightInfo)
Parameters
Type Name Description
TVertex vertex
System.Object semiHighlightInfo
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Layout(Boolean)

Layouts the current Graph.

Declaration
protected virtual void Layout(bool continueLayout)
Parameters
Type Name Description
System.Boolean continueLayout

Indicates if we should continue layout. If layout is continued it gets the relative position of every vertex otherwise it's gets it only for the vertices with fixed parents.

| Improve this Doc View Source

OnGraphPropertyChanged(DependencyObject, DependencyPropertyChangedEventArgs)

It's called when the Graph dependency property changed.

Declaration
protected static void OnGraphPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
Parameters
Type Name Description
DependencyObject d

The GraphLayout instance which Graph dependency property changed.

DependencyPropertyChangedEventArgs args

OldValue & NewValue

| Improve this Doc View Source

OnLayoutFinished()

Layout process ended callback.

Declaration
protected virtual void OnLayoutFinished()
| Improve this Doc View Source

OnLayoutIterationFinished(IDictionary<TVertex, Point>, String)

Layout process iteration ended callback.

Declaration
protected virtual void OnLayoutIterationFinished(IDictionary<TVertex, Point> positions, string message)
Parameters
Type Name Description
IDictionary<TVertex, Point> positions

Vertices positions.

System.String message

Iteration information message.

Exceptions
Type Condition
System.ArgumentNullException

positions is null.

| Improve this Doc View Source

OnLayoutIterationFinished(ILayoutIterationEventArgs<TVertex>)

Layout process iteration ended callback.

Declaration
protected virtual void OnLayoutIterationFinished(ILayoutIterationEventArgs<TVertex> iterationArgs)
Parameters
Type Name Description
ILayoutIterationEventArgs<TVertex> iterationArgs

Iteration arguments.

| Improve this Doc View Source

OnLayoutStarted()

Layout process started callback.

Declaration
protected void OnLayoutStarted()
| Improve this Doc View Source

OverlapRemoval(IDictionary<TVertex, Point>, IDictionary<TVertex, Size>)

Runs overlap removal algorithm.

Declaration
protected IDictionary<TVertex, Point> OverlapRemoval(IDictionary<TVertex, Point> positions, IDictionary<TVertex, Size> sizes)
Parameters
Type Name Description
IDictionary<TVertex, Point> positions

Vertices positions.

IDictionary<TVertex, Size> sizes

Vertices sizes.

Returns
Type Description
IDictionary<TVertex, Point>

Vertices positions after overlap removal process (if run), otherwise return input positions.

| Improve this Doc View Source

RecalculateEdgeRouting()

Re-compute edge routing.

Declaration
public void RecalculateEdgeRouting()
| Improve this Doc View Source

RecalculateOverlapRemoval()

Re-compute overlap removal.

Declaration
public void RecalculateOverlapRemoval()
| Improve this Doc View Source

RecreateGraphElements(Boolean)

If the graph has been changed, the elements will be regenerated.

Declaration
protected void RecreateGraphElements(bool tryKeepControls)
Parameters
Type Name Description
System.Boolean tryKeepControls
| Improve this Doc View Source

Relayout()

The layout process will be started without initial vertices positions.

Declaration
public override void Relayout()
Overrides
GraphCanvas.Relayout()
| Improve this Doc View Source

RemoveAllGraphElements()

Removes all vertices and edges from graph.

Declaration
protected void RemoveAllGraphElements()
| Improve this Doc View Source

RemoveEdgeControl(TEdge)

Removes the given edge from graph.

Declaration
protected virtual void RemoveEdgeControl(TEdge edge)
Parameters
Type Name Description
TEdge edge

Edge to remove.

| Improve this Doc View Source

RemoveHighlightFromEdge(TEdge)

Declaration
public void RemoveHighlightFromEdge(TEdge edge)
Parameters
Type Name Description
TEdge edge
| Improve this Doc View Source

RemoveHighlightFromVertex(TVertex)

Declaration
public void RemoveHighlightFromVertex(TVertex vertex)
Parameters
Type Name Description
TVertex vertex
| Improve this Doc View Source

RemoveSemiHighlightFromEdge(TEdge)

Declaration
public void RemoveSemiHighlightFromEdge(TEdge edge)
Parameters
Type Name Description
TEdge edge
| Improve this Doc View Source

RemoveSemiHighlightFromVertex(TVertex)

Declaration
public void RemoveSemiHighlightFromVertex(TVertex vertex)
Parameters
Type Name Description
TVertex vertex
| Improve this Doc View Source

RemoveVertexControl(TVertex)

Removes the given vertex from graph.

Declaration
protected virtual void RemoveVertexControl(TVertex vertex)
Parameters
Type Name Description
TVertex vertex

Vertex to remove.

| Improve this Doc View Source

RouteEdges(IDictionary<TVertex, Point>, IDictionary<TVertex, Size>)

Runs the proper edge routing algorithm.

Declaration
protected IDictionary<TEdge, Point[]> RouteEdges(IDictionary<TVertex, Point> positions, IDictionary<TVertex, Size> sizes)
Parameters
Type Name Description
IDictionary<TVertex, Point> positions

The vertices positions.

IDictionary<TVertex, Size> sizes

The vertices sizes.

Returns
Type Description
IDictionary<TEdge, Point[]>

The routes of the edges.

Exceptions
Type Condition
System.ArgumentNullException

sizes is null.

| Improve this Doc View Source

SemiHighlightEdge(TEdge, Object)

Declaration
public void SemiHighlightEdge(TEdge edge, object semiHighlightInfo)
Parameters
Type Name Description
TEdge edge
System.Object semiHighlightInfo
| Improve this Doc View Source

SemiHighlightVertex(TVertex, Object)

Declaration
public void SemiHighlightVertex(TVertex vertex, object semiHighlightInfo)
Parameters
Type Name Description
TVertex vertex
System.Object semiHighlightInfo

Extension Methods

GraphHelpers.GetDistances<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph)
GraphHelpers.GetDiameter<TVertex, TEdge, TGraph>(TGraph, out Double[,])
  • Improve this Doc
  • View Source
In This Article
Back to top GraphShape