Class
MoveAnimation

Animation which moves an object from Old Position to Current Position.

Definition

Constructors

MoveAnimation()

Initializes a new instance of the MoveAnimation class.

Declaration

cs-api-definition
public MoveAnimation()

Fields

CurrentPositionProperty

Represents the CurrentPosition attached property.

Declaration

cs-api-definition
public static readonly DependencyProperty CurrentPositionProperty

Field Value

DependencyProperty

OldPositionProperty

Represents the OldPosition attached property.

Declaration

cs-api-definition
public static readonly DependencyProperty OldPositionProperty

Field Value

DependencyProperty

Methods

CreateAnimationOverride(FrameworkElement, FrameworkElement)

Creates the slide animation.

Declaration

cs-api-definition
protected override Storyboard CreateAnimationOverride(FrameworkElement control, FrameworkElement target)

Parameters

control

FrameworkElement

The control for which the animation is needed.

target

FrameworkElement

The targeted element of the animation.

Returns

Storyboard

The newly created animation.

Overrides BaseAnimation.CreateAnimationOverride(FrameworkElement, FrameworkElement)

GetCurrentPosition(DependencyObject)

Gets the CurrentPosition for the given DependencyObject, normally a UIElement.

Declaration

cs-api-definition
public static Point GetCurrentPosition(DependencyObject obj)

Parameters

obj

DependencyObject

The target animated object, normally a UIElement.

Returns

Point

The current position of the given object.

Remarks

This attached property is used by the controls to attach metadata for the animations and it is being used by the Resize and Move animations to deliver better experience.

GetOldPosition(DependencyObject)

Gets the OldPosition for the given DependencyObject, normally a UIElement.

Declaration

cs-api-definition
public static Point GetOldPosition(DependencyObject obj)

Parameters

obj

DependencyObject

The target animated object, normally a UIElement.

Returns

Point

The old position of the given object.

Remarks

This attached property is used by the controls to attach metadata for the animations and it is being used by the Resize and Move animations to deliver better experience.

SetCurrentPosition(DependencyObject, Point)

Sets the CurrentPosition attached property to the given DependencyObject, normally a UIElement.

Declaration

cs-api-definition
public static void SetCurrentPosition(DependencyObject obj, Point value)

Parameters

obj

DependencyObject

The target animated object, normally a UIElement.

value

Point

The current position to assign.

Remarks

This attached property is used by the controls to attach metadata for the animations and it is being used by the Resize and Move animations to deliver better experience.

SetOldPosition(DependencyObject, Point)

Sets the OldPosition attached property to the given DependencyObject, normally a UIElement.

Declaration

cs-api-definition
public static void SetOldPosition(DependencyObject obj, Point value)

Parameters

obj

DependencyObject

The target animated object, normally a UIElement.

value

Point

The old position to assign.

Remarks

This attached property is used by the controls to attach metadata for the animations and it is being used by the Resize and Move animations to deliver better experience.

UpdateAnimationOverride(FrameworkElement, Storyboard, FrameworkElement, params object[])

Updates the slide animation.

Declaration

cs-api-definition
protected override void UpdateAnimationOverride(FrameworkElement control, Storyboard storyboard, FrameworkElement target, params object[] args)

Parameters

control

FrameworkElement

The control for which the animation needs to be updated.

storyboard

Storyboard

Storyboard that needs to be updated.

target

FrameworkElement

The targeted element of the animation.

args

object[]

Overrides BaseAnimation.UpdateAnimationOverride(FrameworkElement, Storyboard, FrameworkElement, params object[])

Remarks

Currently the method sets the SpeedRatio of the storyboard to the global AnimationSpeedRatio if the local SpeedRatio is null. If the local SpeedRatio value is set, it will be used.