In This Article

AnimatedPanelBase Class

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

public abstract class AnimatedPanelBase : Panel, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Panel Object
Derived:
RibbonControlGroupPanel RibbonGalleryPanel RibbonGroupLabelRowPanel RibbonGroupPanel 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

System.Boolean:

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

Methods

ArrangeChildWithAnimation(UIElement, Rect)

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

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

The child System.Windows.UIElement.

bounds System.Windows.Rect

A System.Windows.Rect specifying the target bounds.

Remarks

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

ArrangeChildWithAnimation(UIElement, Rect, Boolean)

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

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

The child System.Windows.UIElement.

bounds System.Windows.Rect

A System.Windows.Rect specifying the target bounds.

instantaneous System.Boolean

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

Remarks

This method is a replacement of the System.Windows.UIElement.Arrange(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 ms) for a fast animation.

public const double AnimationDurationFast = 0.167

AnimationDurationInstant

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

public const double AnimationDurationInstant = 0

Inherited Members

  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()

Extension Methods