Class GraphLayout<TVertex, TEdge, TGraph>
Graph layout control. Support layout, edge routing and overlap removal algorithms, with multiple layout states.
Inheritance
Inherited Members
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 SourceGraphLayout()
Initializes a new instance of the GraphLayout class.
Declaration
public GraphLayout()
Fields
| Improve this Doc View SourceAnimationDisablerEdgeCountProperty
Animation disabler via edge count dependency property.
Declaration
public static readonly DependencyProperty AnimationDisablerEdgeCountProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
AnimationDisablerVertexCountProperty
Animation disabler via vertex count dependency property.
Declaration
public static readonly DependencyProperty AnimationDisablerVertexCountProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
AsyncComputeProperty
Async computing dependency property.
Declaration
public static readonly DependencyProperty AsyncComputeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
EdgeRoutingAlgorithmFactoryProperty
Edge routing algorithm factory dependency property.
Declaration
public static readonly DependencyProperty EdgeRoutingAlgorithmFactoryProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
EdgeRoutingAlgorithmProperty
Edge routing algorithm dependency property.
Declaration
public static readonly DependencyProperty EdgeRoutingAlgorithmProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
EdgeRoutingAlgorithmPropertyKey
Edge routing algorithm property key.
Declaration
protected static readonly DependencyPropertyKey EdgeRoutingAlgorithmPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
EdgeRoutingAlgorithmTypeProperty
Edge routing algorithm type dependency property.
Declaration
public static readonly DependencyProperty EdgeRoutingAlgorithmTypeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
EdgeRoutingConstraintProperty
Edge routing constraint dependency property.
Declaration
public static readonly DependencyProperty EdgeRoutingConstraintProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
EdgeRoutingParametersProperty
Edge routing parameters dependency property.
Declaration
public static readonly DependencyProperty EdgeRoutingParametersProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
EdgesControls
Edges controls.
Declaration
protected readonly Dictionary<TEdge, EdgeControl> EdgesControls
Field Value
| Type | Description |
|---|---|
| Dictionary<TEdge, EdgeControl> |
GraphProperty
Graph dependency property.
Declaration
public static readonly DependencyProperty GraphProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
HighlightAlgorithmFactoryProperty
Highlight algorithm factory dependency property.
Declaration
public static readonly DependencyProperty HighlightAlgorithmFactoryProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
HighlightAlgorithmProperty
Highlight algorithm dependency property.
Declaration
public static readonly DependencyProperty HighlightAlgorithmProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
HighlightAlgorithmPropertyKey
Highlight algorithm property key.
Declaration
protected static readonly DependencyPropertyKey HighlightAlgorithmPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
HighlightAlgorithmTypeProperty
Highlight algorithm type dependency property.
Declaration
public static readonly DependencyProperty HighlightAlgorithmTypeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
HighlightParametersProperty
Highlight parameters dependency property.
Declaration
public static readonly DependencyProperty HighlightParametersProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
LayoutAlgorithmFactoryProperty
Layout algorithm factory dependency property.
Declaration
public static readonly DependencyProperty LayoutAlgorithmFactoryProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
LayoutAlgorithmProperty
Layout algorithm dependency property.
Declaration
public static readonly DependencyProperty LayoutAlgorithmProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
LayoutAlgorithmPropertyKey
Layout algorithm property key.
Declaration
protected static readonly DependencyPropertyKey LayoutAlgorithmPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
LayoutAlgorithmTypeProperty
Layout algorithm type dependency property.
Declaration
public static readonly DependencyProperty LayoutAlgorithmTypeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
LayoutModeProperty
Layout mode dependency property.
Declaration
public static readonly DependencyProperty LayoutModeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
LayoutParametersProperty
Layout parameters dependency property.
Declaration
public static readonly DependencyProperty LayoutParametersProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
LayoutStateProperty
Layout state dependency property.
Declaration
public static readonly DependencyProperty LayoutStateProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
LayoutStatePropertyKey
Layout state property key.
Declaration
protected static readonly DependencyPropertyKey LayoutStatePropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
LayoutStatusPercentProperty
Layout status percent dependency property.
Declaration
public static readonly DependencyProperty LayoutStatusPercentProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
LayoutStatusPercentPropertyKey
Layout status percent property key.
Declaration
protected static readonly DependencyPropertyKey LayoutStatusPercentPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
OverlapRemovalAlgorithmFactoryProperty
Overlap removal algorithm factory dependency property.
Declaration
public static readonly DependencyProperty OverlapRemovalAlgorithmFactoryProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
OverlapRemovalAlgorithmProperty
Overlap removal algorithm factory dependency property.
Declaration
public static readonly DependencyProperty OverlapRemovalAlgorithmProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
OverlapRemovalAlgorithmPropertyKey
Overlap removal algorithm property key.
Declaration
protected static readonly DependencyPropertyKey OverlapRemovalAlgorithmPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
OverlapRemovalAlgorithmTypeProperty
Overlap removal algorithm type dependency property.
Declaration
public static readonly DependencyProperty OverlapRemovalAlgorithmTypeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
OverlapRemovalConstraintProperty
Overlap removal constraint dependency property.
Declaration
public static readonly DependencyProperty OverlapRemovalConstraintProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
OverlapRemovalParametersProperty
Overlap removal parameters dependency property.
Declaration
public static readonly DependencyProperty OverlapRemovalParametersProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ShowAllStatesProperty
Show all states dependency property.
Declaration
public static readonly DependencyProperty ShowAllStatesProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Sizes
Vertices sizes.
Declaration
protected IDictionary<TVertex, SizeF> Sizes
Field Value
| Type | Description |
|---|---|
| IDictionary<TVertex, SizeF> |
StateCountProperty
Layout states count dependency property.
Declaration
public static readonly DependencyProperty StateCountProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
StateCountPropertyKey
Layout states count property key.
Declaration
protected static readonly DependencyPropertyKey StateCountPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
StateIndexProperty
Index of the currently shown layout state dependency property.
Declaration
public static readonly DependencyProperty StateIndexProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
VerticesControls
Vertices controls.
Declaration
protected readonly Dictionary<TVertex, VertexControl> VerticesControls
Field Value
| Type | Description |
|---|---|
| Dictionary<TVertex, VertexControl> |
Worker
Background worker to run layout algorithm.
Declaration
protected BackgroundWorker Worker
Field Value
| Type | Description |
|---|---|
| BackgroundWorker |
Properties
| Improve this Doc View SourceActualLayoutMode
Current
Declaration
protected Algorithms.Layout.LayoutMode ActualLayoutMode { get; }
Property Value
| Type | Description |
|---|---|
| Algorithms.Layout.LayoutMode |
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 |
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 |
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 |
CanAnimate
Gets whether the animation could be run, or not.
Declaration
public override bool CanAnimate { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceCanLayout
Indicates if layout can be done.
Declaration
protected virtual bool CanLayout { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
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.
EdgeRoutingAlgorithmFactory
Edge routing algorithm factory.
Declaration
public IEdgeRoutingAlgorithmFactory<TVertex, TEdge, TGraph> EdgeRoutingAlgorithmFactory { get; set; }
Property Value
| Type | Description |
|---|---|
| IEdgeRoutingAlgorithmFactory<TVertex, TEdge, TGraph> |
EdgeRoutingAlgorithmType
Edge routing algorithm type.
Declaration
public string EdgeRoutingAlgorithmType { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
EdgeRoutingConstraint
Edge routing constraint.
Declaration
public AlgorithmConstraints EdgeRoutingConstraint { get; set; }
Property Value
| Type | Description |
|---|---|
| AlgorithmConstraints |
EdgeRoutingParameters
Edge routing parameters.
Declaration
public IEdgeRoutingParameters EdgeRoutingParameters { get; set; }
Property Value
| Type | Description |
|---|---|
| IEdgeRoutingParameters |
Graph
The graph we want to show.
Declaration
public TGraph Graph { get; set; }
Property Value
| Type | Description |
|---|---|
| TGraph |
HighlightAlgorithm
Highlight algorithm.
Declaration
public IHighlightAlgorithm<TVertex, TEdge> HighlightAlgorithm { get; protected set; }
Property Value
| Type | Description |
|---|---|
| IHighlightAlgorithm<TVertex, TEdge> |
HighlightAlgorithmFactory
Highlight algorithm factory.
Declaration
public IHighlightAlgorithmFactory<TVertex, TEdge, TGraph> HighlightAlgorithmFactory { get; set; }
Property Value
| Type | Description |
|---|---|
| IHighlightAlgorithmFactory<TVertex, TEdge, TGraph> |
HighlightAlgorithmType
Highlight algorithm type.
Declaration
public string HighlightAlgorithmType { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
HighlightedEdges
Declaration
public IEnumerable<TEdge> HighlightedEdges { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<TEdge> |
HighlightedVertices
Declaration
public IEnumerable<TVertex> HighlightedVertices { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<TVertex> |
HighlightParameters
Highlight parameters.
Declaration
public IHighlightParameters HighlightParameters { get; set; }
Property Value
| Type | Description |
|---|---|
| IHighlightParameters |
IsCompoundMode
Indicates if ActualLayoutMode is a
Declaration
protected bool IsCompoundMode { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
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> |
LayoutAlgorithmFactory
Layout algorithm factory.
Declaration
public ILayoutAlgorithmFactory<TVertex, TEdge, TGraph> LayoutAlgorithmFactory { get; set; }
Property Value
| Type | Description |
|---|---|
| ILayoutAlgorithmFactory<TVertex, TEdge, TGraph> |
LayoutAlgorithmType
Layout algorithm type.
Declaration
public string LayoutAlgorithmType { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
LayoutMode
Layout mode.
Declaration
public LayoutMode LayoutMode { get; set; }
Property Value
| Type | Description |
|---|---|
| LayoutMode |
LayoutParameters
Layout parameters.
Declaration
public ILayoutParameters LayoutParameters { get; set; }
Property Value
| Type | Description |
|---|---|
| ILayoutParameters |
LayoutState
Layout state.
Declaration
public LayoutState<TVertex, TEdge> LayoutState { get; protected set; }
Property Value
| Type | Description |
|---|---|
| LayoutState<TVertex, TEdge> |
LayoutStatusPercent
Status of the layout process in percent.
Declaration
public double LayoutStatusPercent { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
OverlapRemovalAlgorithm
Overlap removal algorithm.
Declaration
public IOverlapRemovalAlgorithm<TVertex> OverlapRemovalAlgorithm { get; protected set; }
Property Value
| Type | Description |
|---|---|
| IOverlapRemovalAlgorithm<TVertex> |
OverlapRemovalAlgorithmFactory
Overlap removal algorithm factory.
Declaration
public IOverlapRemovalAlgorithmFactory<TVertex> OverlapRemovalAlgorithmFactory { get; set; }
Property Value
| Type | Description |
|---|---|
| IOverlapRemovalAlgorithmFactory<TVertex> |
OverlapRemovalAlgorithmType
Overlap removal algorithm type.
Declaration
public string OverlapRemovalAlgorithmType { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
OverlapRemovalConstraint
Overlap removal constraint.
Declaration
public AlgorithmConstraints OverlapRemovalConstraint { get; set; }
Property Value
| Type | Description |
|---|---|
| AlgorithmConstraints |
OverlapRemovalParameters
Overlap removal parameters.
Declaration
public IOverlapRemovalParameters OverlapRemovalParameters { get; set; }
Property Value
| Type | Description |
|---|---|
| IOverlapRemovalParameters |
SemiHighlightedEdges
Declaration
public IEnumerable<TEdge> SemiHighlightedEdges { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<TEdge> |
SemiHighlightedVertices
Declaration
public IEnumerable<TVertex> SemiHighlightedVertices { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<TVertex> |
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 |
StateCount
Number of layout states.
Declaration
public int StateCount { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
StateIndex
Index of the currently shown layout state.
Declaration
public int StateIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
VerticesSizes
Vertices sizes.
Declaration
protected IDictionary<TVertex, SizeF> VerticesSizes { get; }
Property Value
| Type | Description |
|---|---|
| IDictionary<TVertex, SizeF> |
Methods
| Improve this Doc View SourceCancelLayout()
Cancels layout computing.
Declaration
public void CancelLayout()
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. |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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). |
ContinueLayout()
The layout process will be initialized with the current vertices positions.
Declaration
public override void ContinueLayout()
Overrides
| Improve this Doc View SourceCreateEdgeControl(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 |
|
CreateHighlightContext()
Creates a
Declaration
protected virtual IHighlightContext<TVertex, TEdge, TGraph> CreateHighlightContext()
Returns
| Type | Description |
|---|---|
| IHighlightContext<TVertex, TEdge, TGraph> | Created |
CreateLayoutContext(IDictionary<TVertex, Point>, IDictionary<TVertex, Size>)
Creates a
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 |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
CreateOverlapRemovalContext(IDictionary<TVertex, Point>, IDictionary<TVertex, Size>)
Creates a
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 |
|
| System.ArgumentNullException |
|
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 |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
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 |
|
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 |
|
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 |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
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 |
|
HighlightEdge(TEdge, Object)
Declaration
public void HighlightEdge(TEdge edge, object highlightInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| TEdge | edge | |
| System.Object | highlightInfo |
HighlightVertex(TVertex, Object)
Declaration
public void HighlightVertex(TVertex vertex, object highlightInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| TVertex | vertex | |
| System.Object | highlightInfo |
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 |
|
IsHighlightedEdge(TEdge)
Declaration
public bool IsHighlightedEdge(TEdge edge)
Parameters
| Type | Name | Description |
|---|---|---|
| TEdge | edge |
Returns
| Type | Description |
|---|---|
| System.Boolean |
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 |
IsHighlightedVertex(TVertex)
Declaration
public bool IsHighlightedVertex(TVertex vertex)
Parameters
| Type | Name | Description |
|---|---|---|
| TVertex | vertex |
Returns
| Type | Description |
|---|---|
| System.Boolean |
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 |
IsSemiHighlightedEdge(TEdge)
Declaration
public bool IsSemiHighlightedEdge(TEdge edge)
Parameters
| Type | Name | Description |
|---|---|---|
| TEdge | edge |
Returns
| Type | Description |
|---|---|
| System.Boolean |
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 |
IsSemiHighlightedVertex(TVertex)
Declaration
public bool IsSemiHighlightedVertex(TVertex vertex)
Parameters
| Type | Name | Description |
|---|---|---|
| TVertex | vertex |
Returns
| Type | Description |
|---|---|
| System.Boolean |
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 |
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. |
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 |
OnLayoutFinished()
Layout process ended callback.
Declaration
protected virtual void OnLayoutFinished()
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 |
|
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. |
OnLayoutStarted()
Layout process started callback.
Declaration
protected void OnLayoutStarted()
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 |
RecalculateEdgeRouting()
Re-compute edge routing.
Declaration
public void RecalculateEdgeRouting()
RecalculateOverlapRemoval()
Re-compute overlap removal.
Declaration
public void RecalculateOverlapRemoval()
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 |
Relayout()
The layout process will be started without initial vertices positions.
Declaration
public override void Relayout()
Overrides
| Improve this Doc View SourceRemoveAllGraphElements()
Removes all vertices and edges from graph.
Declaration
protected void RemoveAllGraphElements()
RemoveEdgeControl(TEdge)
Removes the given edge from graph.
Declaration
protected virtual void RemoveEdgeControl(TEdge edge)
Parameters
| Type | Name | Description |
|---|---|---|
| TEdge | edge | Edge to remove. |
RemoveHighlightFromEdge(TEdge)
Declaration
public void RemoveHighlightFromEdge(TEdge edge)
Parameters
| Type | Name | Description |
|---|---|---|
| TEdge | edge |
RemoveHighlightFromVertex(TVertex)
Declaration
public void RemoveHighlightFromVertex(TVertex vertex)
Parameters
| Type | Name | Description |
|---|---|---|
| TVertex | vertex |
RemoveSemiHighlightFromEdge(TEdge)
Declaration
public void RemoveSemiHighlightFromEdge(TEdge edge)
Parameters
| Type | Name | Description |
|---|---|---|
| TEdge | edge |
RemoveSemiHighlightFromVertex(TVertex)
Declaration
public void RemoveSemiHighlightFromVertex(TVertex vertex)
Parameters
| Type | Name | Description |
|---|---|---|
| TVertex | vertex |
RemoveVertexControl(TVertex)
Removes the given vertex from graph.
Declaration
protected virtual void RemoveVertexControl(TVertex vertex)
Parameters
| Type | Name | Description |
|---|---|---|
| TVertex | vertex | Vertex to remove. |
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 |
|
SemiHighlightEdge(TEdge, Object)
Declaration
public void SemiHighlightEdge(TEdge edge, object semiHighlightInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| TEdge | edge | |
| System.Object | semiHighlightInfo |
SemiHighlightVertex(TVertex, Object)
Declaration
public void SemiHighlightVertex(TVertex vertex, object semiHighlightInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| TVertex | vertex | |
| System.Object | semiHighlightInfo |