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
Gets or sets a value indicating the animation that should be applied to elements changing position/size in the panel due to rearrangement. This is a dependency property.
public ArrangeAnimations ArrangeUpdateAnimation { get; set; }
Property Value
- ArrangeAnimations:
A value indicating the animation that should be applied to elements changing position/size the panel due to rearrangement. The default value is
ArrangeAnimations.Move | ArrangeAnimations.Size
.
ArrangeUpdateDuration
Gets or sets the duration of the Storyboard applied to elements changing position/size in the panel due to rearrangement. This is a dependency property.
public Duration ArrangeUpdateDuration { get; set; }
Property Value
- Duration:
The duration of the Storyboard applied to elements changing position/size in the panel due to rearrangement. The default value is
250ms
.
EnterAnimation
Gets or sets a value indicating the animation that should be applied to elements entering the panel. This is a dependency property.
public ArrangeAnimations EnterAnimation { get; set; }
Property Value
- ArrangeAnimations:
A value indicating the animation that should be applied to elements entering the panel. The default value is
ArrangeAnimations.Fade
.
EnterDuration
Gets or sets the duration of the Storyboard applied to elements entering the panel. This is a dependency property.
public Duration EnterDuration { get; set; }
Property Value
- Duration:
The duration of the Storyboard applied to elements entering the panel. The default value is
250ms
.
FadeEnterAnimationSettings
Gets or sets the fade animation settings used for elements entering the panel. This is a dependency property.
public ArrangeAnimationSettings FadeEnterAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The fade animation settings used for elements entering the panel. The default value is
null
.
FadeEnterOpacity
Gets or sets the fade animation starting opacity for elements entering the panel. This is a dependency property.
public double FadeEnterOpacity { get; set; }
Property Value
- double:
The fade animation starting opacity used for elements entering the panel. The default value is
0.0
.
FadeLeaveAnimationSettings
Gets or sets the fade animation settings used for elements leaving the panel. This is a dependency property.
public ArrangeAnimationSettings FadeLeaveAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The fade animation settings used for elements leaving the panel. The default value is
null
.
FadeLeaveOpacity
Gets or sets the fade animation ending opacity for elements leaving the panel. This is a dependency property.
public double FadeLeaveOpacity { get; set; }
Property Value
- double:
The fade animation ending opacity used for elements leaving the panel. The default value is
0.0
.
LayoutUpdateAnimation
Gets or sets a value indicating the animation that should be applied to elements changing position/size in the panel due to a layout logic change. This is a dependency property.
public ArrangeAnimations LayoutUpdateAnimation { get; set; }
Property Value
- ArrangeAnimations:
A value indicating the animation that should be applied to elements changing position/size the panel due to a layout logic change. The default value is
ArrangeAnimations.Move | ArrangeAnimations.Size
.
LayoutUpdateDuration
Gets or sets the duration of the Storyboard applied to elements changing position/size in the panel due to a layout logic change. This is a dependency property.
public Duration LayoutUpdateDuration { get; set; }
Property Value
- Duration:
The duration of the Storyboard applied to elements changing position/size in the panel due to a layout logic change. The default value is
250ms
.
LeaveAnimation
Gets or sets a value indicating the animation that should be applied to elements leaving the panel. This is a dependency property.
public ArrangeAnimations LeaveAnimation { get; set; }
Property Value
- ArrangeAnimations:
A value indicating the animation that should be applied to elements leaving the panel. The default value is
ArrangeAnimations.Fade
.
LeaveDuration
Gets or sets the duration of the Storyboard applied to elements leaving the panel. This is a dependency property.
public Duration LeaveDuration { get; set; }
Property Value
- Duration:
The duration of the Storyboard applied to elements leaving the panel. The default value is
250ms
.
MoveArrangeUpdateAnimationSettings
Gets or sets the move animation settings used for elements updating in the panel due to rearrangement. This is a dependency property.
public ArrangeAnimationSettings MoveArrangeUpdateAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The move animation settings used for elements updating in the panel due to rearrangement. The default value is
null
.
MoveEnterAnimationSettings
Gets or sets the move animation settings used for elements entering the panel. This is a dependency property.
public ArrangeAnimationSettings MoveEnterAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The move animation settings used for elements entering the panel. The default value is
null
.
MoveEnterPoint
Gets or sets the move animation starting point for elements entering the panel. This is a dependency property.
public Point? MoveEnterPoint { get; set; }
Property Value
- Point?:
The move animation starting point used for elements entering the panel. The default value is
null
.
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
Gets or sets the move animation settings used for elements updating in the panel due to a layout logic change. This is a dependency property.
public ArrangeAnimationSettings MoveLayoutUpdateAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The move animation settings used for elements updating in the panel due to a layout logic change. The default value is
null
.
MoveLeaveAnimationSettings
Gets or sets the move animation settings used for elements leaving the panel. This is a dependency property.
public ArrangeAnimationSettings MoveLeaveAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The move animation settings used for elements leaving the panel. The default value is
null
.
MoveLeavePoint
Gets or sets the move animation starting point for elements leaving the panel. This is a dependency property.
public Point? MoveLeavePoint { get; set; }
Property Value
- Point?:
The move animation ending point used for elements leaving the panel. The default value is
null
.
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
Gets or sets the rotation animation settings used for elements entering the panel. This is a dependency property.
public ArrangeAnimationSettings RotateEnterAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The rotation animation settings used for elements entering the panel. The default value is
null
.
RotateEnterTotalAngle
Gets or sets the animation's total angle of rotation for elements entering the panel. This is a dependency property.
public double RotateEnterTotalAngle { get; set; }
Property Value
- double:
The animation's total angle of rotation used for elements entering the panel. The default value is
180.0
.
RotateLeaveAnimationSettings
Gets or sets the rotation animation settings used for elements leaving the panel. This is a dependency property.
public ArrangeAnimationSettings RotateLeaveAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The rotation animation settings used for elements leaving the panel. The default value is
null
.
RotateLeaveTotalAngle
Gets or sets the animation's total angle of rotation for elements leaving the panel. This is a dependency property.
public double RotateLeaveTotalAngle { get; set; }
Property Value
- double:
The animation's total angle of rotation used for elements leaving the panel. The default value is
-180.0
.
ScaleEnterAnimationSettings
Gets or sets the scale animation settings used for elements entering the panel. This is a dependency property.
public ArrangeAnimationSettings ScaleEnterAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The scale animation settings used for elements entering the panel. The default value is
null
.
ScaleEnterUniformScale
Gets or sets the scale animation starting value for elements entering the panel. This is a dependency property.
public double ScaleEnterUniformScale { get; set; }
Property Value
- double:
The scale animation starting value used for elements entering the panel. The default value is
0.01
.
ScaleLeaveAnimationSettings
Gets or sets the scale animation settings used for elements leaving the panel. This is a dependency property.
public ArrangeAnimationSettings ScaleLeaveAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The scale animation settings used for elements leaving the panel. The default value is
null
.
ScaleLeaveUniformScale
Gets or sets the scale animation ending value for elements leaving the panel. This is a dependency property.
public double ScaleLeaveUniformScale { get; set; }
Property Value
- double:
The scale animation ending value used for elements leaving the panel. The default value is
0.01
.
SizeArrangeUpdateAnimationSettings
Gets or sets the size animation settings used for elements updating in the panel due to rearrangement. This is a dependency property.
public ArrangeAnimationSettings SizeArrangeUpdateAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The size animation settings used for elements updating in the panel due to rearrangement. The default value is
null
.
SizeLayoutUpdateAnimationSettings
Gets or sets the size animation settings used for elements updating in the panel due to a layout logic change. This is a dependency property.
public ArrangeAnimationSettings SizeLayoutUpdateAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The size animation settings used for elements updating in the panel due to a layout logic change. The default value is
null
.
TranslateEnterAnimationSettings
Gets or sets the translate animation settings used for elements entering the panel. This is a dependency property.
public ArrangeAnimationSettings TranslateEnterAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The translate animation settings used for elements entering the panel. The default value is
null
.
TranslateEnterPoint
Gets or sets the translate animation starting point for elements entering the panel. This is a dependency property.
[TypeConverter(typeof(AnimationPointConverter))]
public Point TranslateEnterPoint { get; set; }
Property Value
- Point:
The translate animation starting point used for elements entering the panel. 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
Gets or sets the translate animation settings used for elements leaving the panel. This is a dependency property.
public ArrangeAnimationSettings TranslateLeaveAnimationSettings { get; set; }
Property Value
- ArrangeAnimationSettings:
The translate animation settings used for elements leaving the panel. The default value is
null
.
TranslateLeavePoint
Gets or sets the translate animation ending point for elements leaving the panel. This is a dependency property.
[TypeConverter(typeof(AnimationPointConverter))]
public Point TranslateLeavePoint { get; set; }
Property Value
- Point:
The translate animation ending point used for elements leaving the panel. 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)
Gets 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 | UIElement | The element that is being arranged. |
state | ArrangeState | The current arrange state of the |
Returns
- Timeline:
A Timeline that animates OpacityProperty.
GetMoveXAnimation(PanelBase, UIElement, ArrangeState)
Gets 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 | UIElement | The element that is being arranged. |
state | ArrangeState | The current arrange state of the |
Returns
- Timeline:
A Timeline that animates ArrangeXAnimatedProperty.
GetMoveYAnimation(PanelBase, UIElement, ArrangeState)
Gets 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 | UIElement | The element that is being arranged. |
state | ArrangeState | The current arrange state of the |
Returns
- Timeline:
A Timeline that animates ArrangeYAnimatedProperty.
GetRotateAnimation(PanelBase, UIElement, ArrangeState)
Gets 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 | UIElement | The element that is being arranged. |
state | ArrangeState | The current arrange state of the |
Returns
- Timeline:
A Timeline that animates AngleProperty.
GetScaleAnimation(PanelBase, UIElement, ArrangeState)
Gets 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 | UIElement | The element that is being arranged. |
state | ArrangeState | The current arrange state of the |
Returns
- Timeline:
A Timeline that animates UniformScaleProperty.
GetSizeHeightAnimation(PanelBase, UIElement, ArrangeState)
Gets 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 | UIElement | The element that is being arranged. |
state | ArrangeState | The current arrange state of the |
Returns
- Timeline:
A Timeline that animates ArrangeHeightAnimatedProperty.
GetSizeWidthAnimation(PanelBase, UIElement, ArrangeState)
Gets 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 | UIElement | The element that is being arranged. |
state | ArrangeState | The current arrange state of the |
Returns
- Timeline:
A Timeline that animates ArrangeWidthAnimatedProperty.
GetStoryboard(PanelBase, UIElement, ArrangeState)
Gets 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 | UIElement | The element that is being arranged. |
state | ArrangeState | The current arrange state of the |
Returns
- Storyboard:
A Storyboard that arranges the specified element.
GetTranslateXAnimation(PanelBase, UIElement, ArrangeState)
Gets 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 | UIElement | The element that is being arranged. |
state | ArrangeState | The current arrange state of the |
Returns
- Timeline:
A Timeline that animates ArrangeXAnimatedProperty.
GetTranslateYAnimation(PanelBase, UIElement, ArrangeState)
Gets 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 | UIElement | The element that is being arranged. |
state | ArrangeState | The current arrange state of the |
Returns
- Timeline:
A Timeline that animates TranslateYProperty.
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 | UIElement | The element that is being arranged. |
state | ArrangeState | The current arrange state of the |
Returns
- bool:
true
if the specified element is or will be within the view of the panel; otherwise,false
.
Fields
ArrangeUpdateAnimationProperty
Identifies the ArrangeUpdateAnimation dependency property. This field is read-only.
public static readonly DependencyProperty ArrangeUpdateAnimationProperty
ArrangeUpdateDurationProperty
Identifies the ArrangeUpdateDuration dependency property. This field is read-only.
public static readonly DependencyProperty ArrangeUpdateDurationProperty
EnterAnimationProperty
Identifies the EnterAnimation dependency property. This field is read-only.
public static readonly DependencyProperty EnterAnimationProperty
EnterDurationProperty
Identifies the EnterDuration dependency property. This field is read-only.
public static readonly DependencyProperty EnterDurationProperty
FadeEnterAnimationSettingsProperty
Identifies the FadeEnterAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty FadeEnterAnimationSettingsProperty
FadeEnterOpacityProperty
Identifies the FadeEnterOpacity dependency property. This field is read-only.
public static readonly DependencyProperty FadeEnterOpacityProperty
FadeLeaveAnimationSettingsProperty
Identifies the FadeLeaveAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty FadeLeaveAnimationSettingsProperty
FadeLeaveOpacityProperty
Identifies the FadeLeaveOpacity dependency property. This field is read-only.
public static readonly DependencyProperty FadeLeaveOpacityProperty
LayoutUpdateAnimationProperty
Identifies the LayoutUpdateAnimation dependency property. This field is read-only.
public static readonly DependencyProperty LayoutUpdateAnimationProperty
LayoutUpdateDurationProperty
Identifies the LayoutUpdateDuration dependency property. This field is read-only.
public static readonly DependencyProperty LayoutUpdateDurationProperty
LeaveAnimationProperty
Identifies the LeaveAnimation dependency property. This field is read-only.
public static readonly DependencyProperty LeaveAnimationProperty
LeaveDurationProperty
Identifies the LeaveDuration dependency property. This field is read-only.
public static readonly DependencyProperty LeaveDurationProperty
MoveArrangeUpdateAnimationSettingsProperty
Identifies the MoveArrangeUpdateAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty MoveArrangeUpdateAnimationSettingsProperty
MoveEnterAnimationSettingsProperty
Identifies the MoveEnterAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty MoveEnterAnimationSettingsProperty
MoveEnterPointProperty
Identifies the MoveEnterPoint dependency property. This field is read-only.
public static readonly DependencyProperty MoveEnterPointProperty
MoveLayoutUpdateAnimationSettingsProperty
Identifies the MoveLayoutUpdateAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty MoveLayoutUpdateAnimationSettingsProperty
MoveLeaveAnimationSettingsProperty
Identifies the MoveLeaveAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty MoveLeaveAnimationSettingsProperty
MoveLeavePointProperty
Identifies the MoveLeavePoint dependency property. This field is read-only.
public static readonly DependencyProperty MoveLeavePointProperty
RotateEnterAnimationSettingsProperty
Identifies the RotateEnterAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty RotateEnterAnimationSettingsProperty
RotateEnterTotalAngleProperty
Identifies the RotateEnterTotalAngle dependency property. This field is read-only.
public static readonly DependencyProperty RotateEnterTotalAngleProperty
RotateLeaveAnimationSettingsProperty
Identifies the RotateLeaveAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty RotateLeaveAnimationSettingsProperty
RotateLeaveTotalAngleProperty
Identifies the RotateLeaveTotalAngle dependency property. This field is read-only.
public static readonly DependencyProperty RotateLeaveTotalAngleProperty
ScaleEnterAnimationSettingsProperty
Identifies the ScaleEnterAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty ScaleEnterAnimationSettingsProperty
ScaleEnterUniformScaleProperty
Identifies the ScaleEnterUniformScale dependency property. This field is read-only.
public static readonly DependencyProperty ScaleEnterUniformScaleProperty
ScaleLeaveAnimationSettingsProperty
Identifies the ScaleLeaveAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty ScaleLeaveAnimationSettingsProperty
ScaleLeaveUniformScaleProperty
Identifies the ScaleLeaveUniformScale dependency property. This field is read-only.
public static readonly DependencyProperty ScaleLeaveUniformScaleProperty
SizeArrangeUpdateAnimationSettingsProperty
Identifies the SizeArrangeUpdateAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty SizeArrangeUpdateAnimationSettingsProperty
SizeLayoutUpdateAnimationSettingsProperty
Identifies the SizeLayoutUpdateAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty SizeLayoutUpdateAnimationSettingsProperty
TranslateEnterAnimationSettingsProperty
Identifies the TranslateEnterAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty TranslateEnterAnimationSettingsProperty
TranslateEnterPointProperty
Identifies the TranslateEnterPoint dependency property. This field is read-only.
public static readonly DependencyProperty TranslateEnterPointProperty
TranslateLeaveAnimationSettingsProperty
Identifies the TranslateLeaveAnimationSettings dependency property. This field is read-only.
public static readonly DependencyProperty TranslateLeaveAnimationSettingsProperty
TranslateLeavePointProperty
Identifies the TranslateLeavePoint dependency property. This field is read-only.
public static readonly DependencyProperty TranslateLeavePointProperty