In This Article

AnimatedPanelBase Class

Provides an abstract base Panel class that can animate its child elements to target bounds.

public abstract class AnimatedPanelBase : Panel
Inheritance:
object Visual UIElement FrameworkElement Panel object
Derived:
RibbonControlGroupPanel RibbonGalleryPanel RibbonGroupLabelRowPanel RibbonGroupPanel RibbonMultiRowControlGroupPanel RibbonTabItemPanel RibbonContainerPanel

Constructors

AnimatedPanelBase()

Initializes an instance of the AnimatedPanelBase class.

protected AnimatedPanelBase()

Properties

CanResetAnimationStateOnLoad

Gets whether the ResetAnimationState() method is called on load to prevent a first-time animation.

protected virtual bool CanResetAnimationStateOnLoad { get; }

Property Value

bool:

true if the ResetAnimationState() method is called on load; otherwise, false.

Methods

ArrangeChildWithAnimation(UIElement, Rect)

Arranges a child UIElement at the specified target bounds via the use of animation.

protected void ArrangeChildWithAnimation(UIElement child, Rect bounds)
Parameter Type Description
child UIElement

The child UIElement.

bounds Rect

A System.Windows.Rect specifying the target bounds.

Remarks

This method is a replacement of the UIElement.System.Windows.UIElement.Arrange(System.Windows.Rect) method, and uses animation to adjust the child element's bounds.

ArrangeChildWithAnimation(UIElement, Rect, bool)

Arranges a child UIElement at the specified target bounds via the use of animation.

protected void ArrangeChildWithAnimation(UIElement child, Rect bounds, bool instantaneous)
Parameter Type Description
child UIElement

The child UIElement.

bounds Rect

A System.Windows.Rect specifying the target bounds.

instantaneous bool

Whether to arrange the child with a zero-duration animation.

Remarks

This method is a replacement of the UIElement.System.Windows.UIElement.Arrange(System.Windows.Rect) method, and uses animation to adjust the child element's bounds.

ResetAnimationState()

Resets the panel's animation state so animations don't occur on the next arrange.

public void ResetAnimationState()

Fields

AnimationDurationFast

Gets the duration (in seconds) for a fast animation.

public const double AnimationDurationFast = 0.167

AnimationDurationInstant

Gets the duration (in seconds) of an instant animation.

public const double AnimationDurationInstant = 0