New to Telerik UI for WPFStart a free 30-day trial

Animation for smooth resizing elements.

Definition

Constructors

Initializes a new instance of the ResizeAnimation class.

C#
public ResizeAnimation()

Fields

CurrentSizeProperty

DependencyProperty

Represents the CurrentSize attached property.

C#
public static readonly DependencyProperty CurrentSizeProperty

OldSizeProperty

DependencyProperty

Represents the OldSize attached property.

C#
public static readonly DependencyProperty OldSizeProperty

Properties

Gets or sets a value indicating the resizing mode (horizontal, vertical, both) of the animation.

C#
public ResizeAnimationResizeMode ResizeMode { get; set; }

Methods

Creates the slide animation.

C#
protected override Storyboard CreateAnimationOverride(FrameworkElement control, FrameworkElement target)
Parameters:controlFrameworkElement

The control for which the animation is needed.

targetFrameworkElement

The targeted element of the animation.

Returns:

Storyboard

The newly created animation.

Overrides: BaseAnimation.CreateAnimationOverride(FrameworkElement, FrameworkElement)

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

C#
public static Size GetCurrentSize(DependencyObject obj)
Parameters:objDependencyObject

The target animated object, normally a UIElement.

Returns:

Size

The current size for the 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.

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

C#
public static Size GetOldSize(DependencyObject obj)
Parameters:objDependencyObject

The target animated object, normally a UIElement.

Returns:

Size

The old size for the 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.

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

C#
public static void SetCurrentSize(DependencyObject obj, Size value)
Parameters:objDependencyObject

The target animated object, normally a UIElement.

valueSize

The current size 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.

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

C#
public static void SetOldSize(DependencyObject obj, Size value)
Parameters:objDependencyObject

The target animated object, normally a UIElement.

valueSize

The old size 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.

Updates the slide animation.

C#
protected override void UpdateAnimationOverride(FrameworkElement control, Storyboard storyboard, FrameworkElement target, params object[] args)
Parameters:controlFrameworkElement

The control for which the animation needs to be updated.

storyboardStoryboard

Storyboard that needs to be updated.

targetFrameworkElement

The targeted element of the animation.

argsobject[]

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.