Show / Hide Table of Contents

Class GraphCanvas

Graph canvas.

Inheritance
System.Object
GraphCanvas
GraphLayout<TVertex, TEdge, TGraph>
Namespace: GraphShape.Controls
Assembly: GraphShape.Controls.dll
Syntax
public class GraphCanvas : Panel

Fields

| Improve this Doc View Source

AnimationLengthProperty

Animation length dependency property.

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

CreationTransitionProperty

Transition creation dependency property.

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

DestructionTransitionProperty

Transition destruction dependency property.

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

IsAnimationEnabledProperty

Animation enabled dependency property.

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

MoveAnimationProperty

Animation movement dependency property.

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

OrigoProperty

Origo dependency property.

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

PositionChangedEvent

Position changed event.

Declaration
public static readonly RoutedEvent PositionChangedEvent
Field Value
Type Description
RoutedEvent
| Improve this Doc View Source

TranslationProperty

Translation dependency property.

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

TranslationPropertyKey

Translation property key.

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

XProperty

X attached dependency property.

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

YProperty

Y attached dependency property.

Declaration
public static readonly DependencyProperty YProperty
Field Value
Type Description
DependencyProperty

Properties

| Improve this Doc View Source

AnimationContext

Gets the context of the animation.

Declaration
public virtual IAnimationContext AnimationContext { get; }
Property Value
Type Description
IAnimationContext
| Improve this Doc View Source

AnimationLength

Gets or sets the length of the animation. If the length of the animations is 0:0:0.000, there won't be any animations.

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

CanAnimate

Gets whether the animation could be run, or not.

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

CreationTransition

Gets or sets the animation controller for the 'Control Creation' animation.

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

DestructionTransition

Gets or sets the transition controller for the 'Control Destruction' animation.

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

IsAnimationEnabled

If this property is true, and the other animation disabler properties are also true, the animation is enabled. If this is false, the animations will be disabled.

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

MoveAnimation

Gets or sets the animation controller for the 'Control Moving' animation.

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

Origo

Gets or sets the virtual origo of the canvas.

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

Translation

Translation.

Declaration
public System.Windows.Vector Translation { get; protected set; }
Property Value
Type Description
System.Windows.Vector

Methods

| Improve this Doc View Source

AddPositionChangedHandler(DependencyObject, RoutedEventHandler)

Adds a new PositionChangedEvent handler.

Declaration
public static void AddPositionChangedHandler(DependencyObject d, RoutedEventHandler handler)
Parameters
Type Name Description
DependencyObject d
RoutedEventHandler handler
| Improve this Doc View Source

ArrangeOverride(System.Windows.Size)

Arranges the size of the control.

Declaration
protected override System.Windows.Size ArrangeOverride(System.Windows.Size finalSize)
Parameters
Type Name Description
System.Windows.Size finalSize

The arranged size of the control.

Returns
Type Description
System.Windows.Size

The size of the control.

| Improve this Doc View Source

ContinueLayout()

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

Declaration
public virtual void ContinueLayout()
| Improve this Doc View Source

GetX(DependencyObject)

Gets the X attached property value.

Declaration
public static double GetX(DependencyObject obj)
Parameters
Type Name Description
DependencyObject obj
Returns
Type Description
System.Double
| Improve this Doc View Source

GetY(DependencyObject)

Gets the Y attached property value.

Declaration
public static double GetY(DependencyObject obj)
Parameters
Type Name Description
DependencyObject obj
Returns
Type Description
System.Double
| Improve this Doc View Source

MeasureOverride(System.Windows.Size)

Overridden measure. It calculates a size where all of of the vertices are visible.

Declaration
protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize)
Parameters
Type Name Description
System.Windows.Size availableSize

The size constraint.

Returns
Type Description
System.Windows.Size

The calculated size.

| Improve this Doc View Source

Relayout()

The layout process will be started without initial vertices positions.

Declaration
public virtual void Relayout()
| Improve this Doc View Source

RemovePositionChangedHandler(DependencyObject, RoutedEventHandler)

Removes the given handler from PositionChangedEvent.

Declaration
public static void RemovePositionChangedHandler(DependencyObject d, RoutedEventHandler handler)
Parameters
Type Name Description
DependencyObject d
RoutedEventHandler handler
| Improve this Doc View Source

RunCreationTransition(Control)

Does a transition for the control which has been already added to this container.

Declaration
protected virtual void RunCreationTransition(Control control)
Parameters
Type Name Description
Control control

The control which has been added.

| Improve this Doc View Source

RunDestructionTransition(Control, Boolean)

Transitions a control which gonna' be removed from this container.

Declaration
protected virtual void RunDestructionTransition(Control control, bool dontRemoveAfter)
Parameters
Type Name Description
Control control

The control which will be removed.

System.Boolean dontRemoveAfter

If it's true, the control won't be removed automatically from this container's System.Windows.Controls.Panel.Children.

| Improve this Doc View Source

RunMoveAnimation(Control, Double, Double)

Animates the position of the given control to the given positions.

Declaration
protected virtual void RunMoveAnimation(Control control, double x, double y)
Parameters
Type Name Description
Control control

The control which should be moved.

System.Double x

The new horizontal position of the control.

System.Double y

The new vertical position of the control.

| Improve this Doc View Source

SetX(DependencyObject, Double)

Sets the X attached property value.

Declaration
public static void SetX(DependencyObject obj, double value)
Parameters
Type Name Description
DependencyObject obj
System.Double value
| Improve this Doc View Source

SetY(DependencyObject, Double)

Sets the Y attached property value.

Declaration
public static void SetY(DependencyObject obj, double value)
Parameters
Type Name Description
DependencyObject obj
System.Double value

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