Class GraphCanvas
Graph canvas.
Namespace: GraphShape.Controls
Assembly: GraphShape.Controls.dll
Syntax
public class GraphCanvas : Panel
Fields
| Improve this Doc View SourceAnimationLengthProperty
Animation length dependency property.
Declaration
public static readonly DependencyProperty AnimationLengthProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
CreationTransitionProperty
Transition creation dependency property.
Declaration
public static readonly DependencyProperty CreationTransitionProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
DestructionTransitionProperty
Transition destruction dependency property.
Declaration
public static readonly DependencyProperty DestructionTransitionProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsAnimationEnabledProperty
Animation enabled dependency property.
Declaration
public static readonly DependencyProperty IsAnimationEnabledProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
MoveAnimationProperty
Animation movement dependency property.
Declaration
public static readonly DependencyProperty MoveAnimationProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
OrigoProperty
Origo dependency property.
Declaration
public static readonly DependencyProperty OrigoProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
PositionChangedEvent
Position changed event.
Declaration
public static readonly RoutedEvent PositionChangedEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
TranslationProperty
Translation dependency property.
Declaration
public static readonly DependencyProperty TranslationProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
TranslationPropertyKey
Translation property key.
Declaration
protected static readonly DependencyPropertyKey TranslationPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
XProperty
X attached dependency property.
Declaration
public static readonly DependencyProperty XProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
YProperty
Y attached dependency property.
Declaration
public static readonly DependencyProperty YProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Properties
| Improve this Doc View SourceAnimationContext
Gets the context of the animation.
Declaration
public virtual IAnimationContext AnimationContext { get; }
Property Value
| Type | Description |
|---|---|
| IAnimationContext |
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 |
CanAnimate
Gets whether the animation could be run, or not.
Declaration
public virtual bool CanAnimate { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
CreationTransition
Gets or sets the animation controller for the 'Control Creation' animation.
Declaration
public ITransition CreationTransition { get; set; }
Property Value
| Type | Description |
|---|---|
| ITransition |
DestructionTransition
Gets or sets the transition controller for the 'Control Destruction' animation.
Declaration
public ITransition DestructionTransition { get; set; }
Property Value
| Type | Description |
|---|---|
| ITransition |
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 |
MoveAnimation
Gets or sets the animation controller for the 'Control Moving' animation.
Declaration
public IAnimation MoveAnimation { get; set; }
Property Value
| Type | Description |
|---|---|
| IAnimation |
Origo
Gets or sets the virtual origo of the canvas.
Declaration
public Point Origo { get; set; }
Property Value
| Type | Description |
|---|---|
| Point |
Translation
Translation.
Declaration
public System.Windows.Vector Translation { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Windows.Vector |
Methods
| Improve this Doc View SourceAddPositionChangedHandler(DependencyObject, RoutedEventHandler)
Adds a new PositionChangedEvent handler.
Declaration
public static void AddPositionChangedHandler(DependencyObject d, RoutedEventHandler handler)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | d | |
| RoutedEventHandler | handler |
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. |
ContinueLayout()
The layout process will be initialized with the current vertices positions.
Declaration
public virtual void ContinueLayout()
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 |
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 |
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. |
Relayout()
The layout process will be started without initial vertices positions.
Declaration
public virtual void Relayout()
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 |
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. |
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. |
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. |
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 |
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 |