In This Article

ArrangeAnimation Class

Represents a default implementation of IArrangeAnimation that allows the animation to be easily configured and/or customized.

public class ArrangeAnimation : FrameworkElement, IArrangeAnimation
Inheritance:
object Visual UIElement FrameworkElement object
Implements:
IArrangeAnimation

Constructors

ArrangeAnimation()

Initializes an instance of the class.

public ArrangeAnimation()

Properties

ArrangeUpdateAnimation

The animation that should be applied to elements changing position/size in the panel due to rearrangement.

public ArrangeAnimations ArrangeUpdateAnimation { get; set; }

Property Value

ArrangeAnimations:

The default value is ArrangeAnimations.Move | ArrangeAnimations.Size.

ArrangeUpdateDuration

The duration of the Storyboard applied to elements changing position/size in the panel due to rearrangement.

public Duration ArrangeUpdateDuration { get; set; }

Property Value

Duration:

The default value is 250ms.

EnterAnimation

The animation that should be applied to elements entering the panel.

public ArrangeAnimations EnterAnimation { get; set; }

Property Value

ArrangeAnimations:

The default value is ArrangeAnimations.Fade.

EnterDuration

The duration of the Storyboard applied to elements entering the panel.

public Duration EnterDuration { get; set; }

Property Value

Duration:

The default value is 250ms.

FadeEnterAnimationSettings

The fade animation settings used for elements entering the panel.

public ArrangeAnimationSettings? FadeEnterAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

FadeEnterOpacity

The fade animation starting opacity for elements entering the panel.

public double FadeEnterOpacity { get; set; }

Property Value

double

FadeLeaveAnimationSettings

The fade animation settings used for elements leaving the panel.

public ArrangeAnimationSettings? FadeLeaveAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

FadeLeaveOpacity

The fade animation ending opacity for elements leaving the panel.

public double FadeLeaveOpacity { get; set; }

Property Value

double

LayoutUpdateAnimation

The animation that should be applied to elements changing position/size in the panel due to a layout logic change.

public ArrangeAnimations LayoutUpdateAnimation { get; set; }

Property Value

ArrangeAnimations:

The default value is ArrangeAnimations.Move | ArrangeAnimations.Size.

LayoutUpdateDuration

The duration of the Storyboard applied to elements changing position/size in the panel due to a layout logic change.

public Duration LayoutUpdateDuration { get; set; }

Property Value

Duration:

The default value is 250ms.

LeaveAnimation

The animation that should be applied to elements leaving the panel.

public ArrangeAnimations LeaveAnimation { get; set; }

Property Value

ArrangeAnimations:

The default value is ArrangeAnimations.Fade.

LeaveDuration

The duration of the Storyboard applied to elements leaving the panel.

public Duration LeaveDuration { get; set; }

Property Value

Duration:

The default value is 250ms.

MoveArrangeUpdateAnimationSettings

The move animation settings used for elements updating in the panel due to rearrangement.

public ArrangeAnimationSettings? MoveArrangeUpdateAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

MoveEnterAnimationSettings

The move animation settings used for elements entering the panel.

public ArrangeAnimationSettings? MoveEnterAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

MoveEnterPoint

The move animation starting point for elements entering the panel.

public Point? MoveEnterPoint { get; set; }

Property Value

Point?

Remarks

If this property is set to null, then the starting point will not be animated. When non-null, the X and Y values determine the starting point using values relative to the panels bounds.

If X and Y have a value of -1, then the starting point will be the top-left corner of the panel. If X and Y have a value of 0, then the starting point will be the center of the panel. If X and Y have a value of 1, then the starting point will be the bottom-right corner of the panel. If the values are greater than 1 or less than -1, then the starting point will be off screen by the relative difference.

If X or Y are set to double.NaN, then that value will not be animated. For example, this can be used to slide items in from the left by specifying a point of 1.2,NaN.

Finally, if X or Y are set to double.PositiveInfinity or double.NegativeInfinity, then that starting value will be determined randomly.

MoveLayoutUpdateAnimationSettings

The move animation settings used for elements updating in the panel due to a layout logic change.

public ArrangeAnimationSettings? MoveLayoutUpdateAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

MoveLeaveAnimationSettings

The move animation settings used for elements leaving the panel.

public ArrangeAnimationSettings? MoveLeaveAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

MoveLeavePoint

The move animation starting point for elements leaving the panel.

public Point? MoveLeavePoint { get; set; }

Property Value

Point?

Remarks

If this property is set to null, then the ending point will not be animated. When non-null, the X and Y values determine the ending point using values relative to the panels bounds.

If X and Y have a value of -1, then the ending point will be the top-left corner of the panel. If X and Y have a value of 0, then the ending point will be the center of the panel. If X and Y have a value of 1, then the ending point will be the bottom-right corner of the panel. If the values are greater than 1 or less than -1, then the ending point will be off screen by the relative difference.

If X or Y are set to double.NaN, then that value will not be animated. For example, this can be used to slide items in from the left by specifying a point of 1.2,NaN.

Finally, if X or Y are set to double.PositiveInfinity or double.NegativeInfinity, then that ending value will be determined randomly.

RotateEnterAnimationSettings

The rotation animation settings used for elements entering the panel.

public ArrangeAnimationSettings? RotateEnterAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

RotateEnterTotalAngle

The animation's total angle of rotation for elements entering the panel.

public double RotateEnterTotalAngle { get; set; }

Property Value

double:

The default value is 180.0.

RotateLeaveAnimationSettings

The rotation animation settings used for elements leaving the panel.

public ArrangeAnimationSettings? RotateLeaveAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

RotateLeaveTotalAngle

The animation's total angle of rotation for elements leaving the panel.

public double RotateLeaveTotalAngle { get; set; }

Property Value

double:

The default value is -180.0.

ScaleEnterAnimationSettings

The scale animation settings used for elements entering the panel.

public ArrangeAnimationSettings? ScaleEnterAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

ScaleEnterUniformScale

The scale animation starting value for elements entering the panel.

public double ScaleEnterUniformScale { get; set; }

Property Value

double:

The default value is 0.01.

ScaleLeaveAnimationSettings

The scale animation settings used for elements leaving the panel.

public ArrangeAnimationSettings? ScaleLeaveAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

ScaleLeaveUniformScale

The scale animation ending value for elements leaving the panel.

public double ScaleLeaveUniformScale { get; set; }

Property Value

double:

The default value is 0.01.

SizeArrangeUpdateAnimationSettings

The size animation settings used for elements updating in the panel due to rearrangement.

public ArrangeAnimationSettings? SizeArrangeUpdateAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

SizeLayoutUpdateAnimationSettings

The size animation settings used for elements updating in the panel due to a layout logic change.

public ArrangeAnimationSettings? SizeLayoutUpdateAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

TranslateEnterAnimationSettings

The translate animation settings used for elements entering the panel.

public ArrangeAnimationSettings? TranslateEnterAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

TranslateEnterPoint

The translate animation starting point for elements entering the panel.

[TypeConverter(typeof(AnimationPointConverter))]
public Point TranslateEnterPoint { get; set; }

Property Value

Point:

The default value is NaN,NaN.

Remarks

The X and Y values determine the starting point using values relative to the panels bounds. If X and Y have a value of -1, then the starting point will be the top-left corner of the panel. If X and Y have a value of 0, then the starting point will be the center of the panel. If X and Y have a value of 1, then the starting point will be the bottom-right corner of the panel. If the values are greater than 1 or less than -1, then the starting point will be off screen by the relative difference.

If X or Y are set to double.NaN, then that value will not be animated. For example, this can be used to slide items in from the left by specifying a point of 1.2,NaN.

Finally, if X or Y are set to double.PositiveInfinity or double.NegativeInfinity, then that starting value will be determined randomly.

TranslateLeaveAnimationSettings

The translate animation settings used for elements leaving the panel.

public ArrangeAnimationSettings? TranslateLeaveAnimationSettings { get; set; }

Property Value

ArrangeAnimationSettings

TranslateLeavePoint

The translate animation ending point for elements leaving the panel.

[TypeConverter(typeof(AnimationPointConverter))]
public Point TranslateLeavePoint { get; set; }

Property Value

Point:

The default value is NaN,NaN.

Remarks

The X and Y values determine the ending point using values relative to the panels bounds. If X and Y have a value of -1, then the ending point will be the top-left corner of the panel. If X and Y have a value of 0, then the ending point will be the center of the panel. If X and Y have a value of 1, then the ending point will be the bottom-right corner of the panel. If the values are greater than 1 or less than -1, then the ending point will be off screen by the relative difference.

If X or Y are set to double.NaN, then that value will not be animated. For example, this can be used to slide items in from the left by specifying a point of 1.2,NaN.

Finally, if X or Y are set to double.PositiveInfinity or double.NegativeInfinity, then that ending value will be determined randomly.

Methods

GetFadeOpacityAnimation(PanelBase, UIElement, ArrangeState)

Returns a Timeline that animates OpacityProperty.

protected virtual Timeline? GetFadeOpacityAnimation(PanelBase panel, UIElement element, ArrangeState state)
Parameter Type Description
panel PanelBase

The panel that contains the element.

element UIElement

The element that is being arranged.

state ArrangeState

The current arrange state of the element.

Returns

Timeline:

A Timeline that animates OpacityProperty.

GetMoveXAnimation(PanelBase, UIElement, ArrangeState)

Returns a Timeline that animates ArrangeXAnimatedProperty.

protected virtual Timeline? GetMoveXAnimation(PanelBase panel, UIElement element, ArrangeState state)
Parameter Type Description
panel PanelBase

The panel that contains the element.

element UIElement

The element that is being arranged.

state ArrangeState

The current arrange state of the element.

Returns

Timeline

GetMoveYAnimation(PanelBase, UIElement, ArrangeState)

Returns a Timeline that animates ArrangeYAnimatedProperty.

protected virtual Timeline? GetMoveYAnimation(PanelBase panel, UIElement element, ArrangeState state)
Parameter Type Description
panel PanelBase

The panel that contains the element.

element UIElement

The element that is being arranged.

state ArrangeState

The current arrange state of the element.

Returns

Timeline

GetRotateAnimation(PanelBase, UIElement, ArrangeState)

Returns a Timeline that animates AngleProperty.

protected virtual Timeline? GetRotateAnimation(PanelBase panel, UIElement element, ArrangeState state)
Parameter Type Description
panel PanelBase

The panel that contains the element.

element UIElement

The element that is being arranged.

state ArrangeState

The current arrange state of the element.

Returns

Timeline

GetScaleAnimation(PanelBase, UIElement, ArrangeState)

Returns a Timeline that animates UniformScaleProperty.

protected virtual Timeline? GetScaleAnimation(PanelBase panel, UIElement element, ArrangeState state)
Parameter Type Description
panel PanelBase

The panel that contains the element.

element UIElement

The element that is being arranged.

state ArrangeState

The current arrange state of the element.

Returns

Timeline

GetSizeHeightAnimation(PanelBase, UIElement, ArrangeState)

Returns a Timeline that animates ArrangeHeightAnimatedProperty.

protected virtual Timeline? GetSizeHeightAnimation(PanelBase panel, UIElement element, ArrangeState state)
Parameter Type Description
panel PanelBase

The panel that contains the element.

element UIElement

The element that is being arranged.

state ArrangeState

The current arrange state of the element.

Returns

Timeline

GetSizeWidthAnimation(PanelBase, UIElement, ArrangeState)

Returns a Timeline that animates ArrangeWidthAnimatedProperty.

protected virtual Timeline? GetSizeWidthAnimation(PanelBase panel, UIElement element, ArrangeState state)
Parameter Type Description
panel PanelBase

The panel that contains the element.

element UIElement

The element that is being arranged.

state ArrangeState

The current arrange state of the element.

Returns

Timeline

GetStoryboard(PanelBase, UIElement, ArrangeState)

Returns a Storyboard that arranges the specified element.

public virtual Storyboard? GetStoryboard(PanelBase panel, UIElement element, ArrangeState state)
Parameter Type Description
panel PanelBase

The panel that contains the element.

element UIElement

The element that is being arranged.

state ArrangeState

The current arrange state of the element.

Returns

Storyboard

GetTranslateXAnimation(PanelBase, UIElement, ArrangeState)

Returns a Timeline that animates TranslateXProperty.

protected virtual Timeline? GetTranslateXAnimation(PanelBase panel, UIElement element, ArrangeState state)
Parameter Type Description
panel PanelBase

The panel that contains the element.

element UIElement

The element that is being arranged.

state ArrangeState

The current arrange state of the element.

Returns

Timeline

GetTranslateYAnimation(PanelBase, UIElement, ArrangeState)

Returns a Timeline that animates TranslateYProperty.

protected virtual Timeline? GetTranslateYAnimation(PanelBase panel, UIElement element, ArrangeState state)
Parameter Type Description
panel PanelBase

The panel that contains the element.

element UIElement

The element that is being arranged.

state ArrangeState

The current arrange state of the element.

Returns

Timeline

IsElementInView(PanelBase, UIElement, ArrangeState)

Determines whether the specified element is or will be within the view of the panel.

public virtual bool IsElementInView(PanelBase panel, UIElement element, ArrangeState state)
Parameter Type Description
panel PanelBase

The panel that contains the element.

element UIElement

The element that is being arranged.

state ArrangeState

The current arrange state of the element.

Returns

bool:

true if the specified element is or will be within the view of the panel; otherwise, false.

Fields

ArrangeUpdateAnimationProperty

Defines the ArrangeUpdateAnimation property.

public static readonly DependencyProperty ArrangeUpdateAnimationProperty

ArrangeUpdateDurationProperty

Defines the ArrangeUpdateDuration property.

public static readonly DependencyProperty ArrangeUpdateDurationProperty

EnterAnimationProperty

Defines the EnterAnimation property.

public static readonly DependencyProperty EnterAnimationProperty

EnterDurationProperty

Defines the EnterDuration property.

public static readonly DependencyProperty EnterDurationProperty

FadeEnterAnimationSettingsProperty

Defines the FadeEnterAnimationSettings property.

public static readonly DependencyProperty FadeEnterAnimationSettingsProperty

FadeEnterOpacityProperty

Defines the FadeEnterOpacity property.

public static readonly DependencyProperty FadeEnterOpacityProperty

FadeLeaveAnimationSettingsProperty

Defines the FadeLeaveAnimationSettings property.

public static readonly DependencyProperty FadeLeaveAnimationSettingsProperty

FadeLeaveOpacityProperty

Defines the FadeLeaveOpacity property.

public static readonly DependencyProperty FadeLeaveOpacityProperty

LayoutUpdateAnimationProperty

Defines the LayoutUpdateAnimation property.

public static readonly DependencyProperty LayoutUpdateAnimationProperty

LayoutUpdateDurationProperty

Defines the LayoutUpdateDuration property.

public static readonly DependencyProperty LayoutUpdateDurationProperty

LeaveAnimationProperty

Defines the LeaveAnimation property.

public static readonly DependencyProperty LeaveAnimationProperty

LeaveDurationProperty

Defines the LeaveDuration property.

public static readonly DependencyProperty LeaveDurationProperty

MoveArrangeUpdateAnimationSettingsProperty

Defines the MoveArrangeUpdateAnimationSettings property.

public static readonly DependencyProperty MoveArrangeUpdateAnimationSettingsProperty

MoveEnterAnimationSettingsProperty

Defines the MoveEnterAnimationSettings property.

public static readonly DependencyProperty MoveEnterAnimationSettingsProperty

MoveEnterPointProperty

Defines the MoveEnterPoint property.

public static readonly DependencyProperty MoveEnterPointProperty

MoveLayoutUpdateAnimationSettingsProperty

Defines the MoveLayoutUpdateAnimationSettings property.

public static readonly DependencyProperty MoveLayoutUpdateAnimationSettingsProperty

MoveLeaveAnimationSettingsProperty

Defines the MoveLeaveAnimationSettings property.

public static readonly DependencyProperty MoveLeaveAnimationSettingsProperty

MoveLeavePointProperty

Defines the MoveLeavePoint property.

public static readonly DependencyProperty MoveLeavePointProperty

RotateEnterAnimationSettingsProperty

Defines the RotateEnterAnimationSettings property.

public static readonly DependencyProperty RotateEnterAnimationSettingsProperty

RotateEnterTotalAngleProperty

Defines the RotateEnterTotalAngle property.

public static readonly DependencyProperty RotateEnterTotalAngleProperty

RotateLeaveAnimationSettingsProperty

Defines the RotateLeaveAnimationSettings property.

public static readonly DependencyProperty RotateLeaveAnimationSettingsProperty

RotateLeaveTotalAngleProperty

Defines the RotateLeaveTotalAngle property.

public static readonly DependencyProperty RotateLeaveTotalAngleProperty

ScaleEnterAnimationSettingsProperty

Defines the ScaleEnterAnimationSettings property.

public static readonly DependencyProperty ScaleEnterAnimationSettingsProperty

ScaleEnterUniformScaleProperty

Defines the ScaleEnterUniformScale property.

public static readonly DependencyProperty ScaleEnterUniformScaleProperty

ScaleLeaveAnimationSettingsProperty

Defines the ScaleLeaveAnimationSettings property.

public static readonly DependencyProperty ScaleLeaveAnimationSettingsProperty

ScaleLeaveUniformScaleProperty

Defines the ScaleLeaveUniformScale property.

public static readonly DependencyProperty ScaleLeaveUniformScaleProperty

SizeArrangeUpdateAnimationSettingsProperty

Defines the SizeArrangeUpdateAnimationSettings property.

public static readonly DependencyProperty SizeArrangeUpdateAnimationSettingsProperty

SizeLayoutUpdateAnimationSettingsProperty

Defines the SizeLayoutUpdateAnimationSettings property.

public static readonly DependencyProperty SizeLayoutUpdateAnimationSettingsProperty

TranslateEnterAnimationSettingsProperty

Defines the TranslateEnterAnimationSettings property.

public static readonly DependencyProperty TranslateEnterAnimationSettingsProperty

TranslateEnterPointProperty

Defines the TranslateEnterPoint property.

public static readonly DependencyProperty TranslateEnterPointProperty

TranslateLeaveAnimationSettingsProperty

Defines the TranslateLeaveAnimationSettings property.

public static readonly DependencyProperty TranslateLeaveAnimationSettingsProperty

TranslateLeavePointProperty

Defines the TranslateLeavePoint property.

public static readonly DependencyProperty TranslateLeavePointProperty

Extension Methods