In This Article

PanelBase Class

Represents the base class for the various animated panels.

public abstract class PanelBase : Panel, ILogicalParent, IVisualParent
Inheritance:
object Visual UIElement FrameworkElement Panel object
Derived:
AnimatedCanvas AnimatedDockPanel AnimatedStackPanel AnimatedWrapPanel FanPanel SwitchPanel ZapPanel
Implements:
ILogicalParent IVisualParent

Constructors

PanelBase()

Initializes a new instance of the PanelBase class.

protected PanelBase()

Properties

AreLeavingElementsAnimated

Gets or sets a value indicating whether elements that are leaving the panel will be automatically animated. This is a dependency property.

public bool AreLeavingElementsAnimated { get; set; }

Property Value

bool:

true if elements that are leaving the panel will be automatically animated; otherwise, false. The default value is true.

ArrangeAnimation

Gets or sets the IArrangeAnimation that controls the animation of elements when arranging. This is a dependency property.

public IArrangeAnimation ArrangeAnimation { get; set; }

Property Value

IArrangeAnimation:

The IArrangeAnimation that controls the animation of elements when arranging The default value is null.

ArrangeAnimationResolved

Gets resolved IArrangeAnimation that controls the animation of elements when arranging.

public virtual IArrangeAnimation ArrangeAnimationResolved { get; }

Property Value

IArrangeAnimation:

The resolved IArrangeAnimation that controls the animation of elements when arranging

Remarks

By default, this property simply returns the value of the ArrangeAnimation property. This property can be overridden by derived classes to provide custom logic.

HasLeavingChildren

Gets a value indicating whether there are any children that are leaving the panel.

public bool HasLeavingChildren { get; }

Property Value

bool:

true if there are any children that are leaving the panel; otherwise, false.

IsLayoutUpdatePending

Gets a value indicating whether a change to the layout logic has changed and the elements have yet to be arranged. This is a dependency property.

public bool IsLayoutUpdatePending { get; protected set; }

Property Value

bool:

true if a change to the layout logic has changed and the elements have yet to be arranged; otherwise, false. The default value is false.

LeavingChildren

Gets the children that are currently leaving the panel.

public ReadOnlyCollection<UIElement> LeavingChildren { get; }

Property Value

ReadOnlyCollection<UIElement>:

The children that are currently leaving the panel.

VisualChildrenCount

Gets the number of child Visual objects in this instance of Panel.

protected override int VisualChildrenCount { get; }

Property Value

int

Methods

ArrangeElement(PanelBase, UIElement, bool)

Arranges the specified element using the current arrange state.

protected static void ArrangeElement(PanelBase panel, UIElement element, bool dispatch)
Parameter Type Description
panel PanelBase

The panel that contains the specified element; otherwise, null.

element UIElement

The element.

dispatch bool

if set to true then the arrange call will be dispatched.

ArrangeElement(PanelBase, UIElement, Rect?, bool)

Arranges the specified element using the current arrange state.

protected static void ArrangeElement(PanelBase panel, UIElement element, Rect? finalRect, bool dispatch)
Parameter Type Description
panel PanelBase

The panel that contains the specified element; otherwise, null.

element UIElement

The element.

finalRect Rect?

The final rect to use to arrange element; otherwise, null to use current position.

dispatch bool

if set to true then the arrange call will be dispatched.

ArrangeElement(UIElement, bool)

Arranges the specified element using the current arrange state.

protected static void ArrangeElement(UIElement element, bool dispatch)
Parameter Type Description
element UIElement

The element.

dispatch bool

if set to true then the arrange call will be dispatched.

ArrangeElement(UIElement, Rect?, bool)

Arranges the specified element using the current arrange state.

protected static void ArrangeElement(UIElement element, Rect? finalRect, bool dispatch)
Parameter Type Description
element UIElement

The element.

finalRect Rect?

The final rect to use to arrange element; otherwise, null to use current position.

dispatch bool

if set to true then the arrange call will be dispatched.

ArrangeElements(IList<UIElement>, Size)

Positions the specified elements and determines a size for a FrameworkElement-derived class.

public abstract Size ArrangeElements(IList<UIElement> elements, Size finalSize)
Parameter Type Description
elements IList<UIElement>

The elements to be arranged.

finalSize Size

The final area within the parent that this element should use to arrange itself and the specified elements.

Returns

Size:

The actual size used.

ArrangeOverride(Size)

Positions child elements and determines a size for a FrameworkElement-derived class.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize Size

The final area within the parent that this element should use to arrange itself and its children.

Returns

Size:

The actual size used.

GetArrangeHeightAnimated(UIElement)

Gets the value of the ArrangeHeightAnimatedProperty attached property for the specified object.

public static double GetArrangeHeightAnimated(UIElement element)
Parameter Type Description
element UIElement

The element from which the property value is read.

Returns

double:

The object's value.

GetArrangeRectAnimated(UIElement)

Gets the current arrange rectangle of the specified element based on the animated properties.

public static Rect GetArrangeRectAnimated(UIElement element)
Parameter Type Description
element UIElement

The element.

Returns

Rect:

The current arrange rectangle of the specified element.

GetArrangeState(UIElement)

Gets the value of the ArrangeStateProperty attached property for the specified object.

public static ArrangeState GetArrangeState(UIElement element)
Parameter Type Description
element UIElement

The element from which the property value is read.

Returns

ArrangeState:

The object's value.

GetArrangeWidthAnimated(UIElement)

Gets the value of the ArrangeWidthAnimatedProperty attached property for the specified object.

public static double GetArrangeWidthAnimated(UIElement element)
Parameter Type Description
element UIElement

The element from which the property value is read.

Returns

double:

The object's value.

GetArrangeXAnimated(UIElement)

Gets the value of the ArrangeXAnimatedProperty attached property for the specified object.

public static double GetArrangeXAnimated(UIElement element)
Parameter Type Description
element UIElement

The element from which the property value is read.

Returns

double:

The object's value.

GetArrangeYAnimated(UIElement)

Gets the value of the ArrangeYAnimatedProperty attached property for the specified object.

public static double GetArrangeYAnimated(UIElement element)
Parameter Type Description
element UIElement

The element from which the property value is read.

Returns

double:

The object's value.

GetIsAnimated(UIElement)

Gets the value of the IsAnimatedProperty attached property for the specified object.

public static bool GetIsAnimated(UIElement element)
Parameter Type Description
element UIElement

The element from which the property value is read.

Returns

bool:

The object's value.

GetVisualChild(int)

Gets a Visual child of this Panel at the specified index position.

protected override Visual GetVisualChild(int index)
Parameter Type Description
index int

The index position of the Visual child.

Returns

Visual:

A Visual child of the parent Panel element.

MeasureElements(IList<UIElement>, Size)

Measures the size in layout required for the specified elements and determines a size for the FrameworkElement-derived class.

public abstract Size MeasureElements(IList<UIElement> elements, Size availableSize)
Parameter Type Description
elements IList<UIElement>

The elements to be measured.

availableSize Size

The available size that this element can give to the specified elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Size:

The size that this element determines it needs during layout, based on its calculations of the specified elements.

MeasureOverride(Size)

Measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.

protected override Size MeasureOverride(Size availableSize)
Parameter Type Description
availableSize Size

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Size:

The size that this element determines it needs during layout, based on its calculations of child element sizes.

OnVisualChildrenChanged(DependencyObject, DependencyObject)

Invoked when the VisualCollection of a visual object is modified.

protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved)
Parameter Type Description
visualAdded DependencyObject

The Visual that was added to the collection.

visualRemoved DependencyObject

The Visual that was removed from the collection.

SetArrangeHeightAnimated(UIElement, double)

Sets the value of the ArrangeHeightAnimatedProperty attached property to the specified object.

public static void SetArrangeHeightAnimated(UIElement element, double value)
Parameter Type Description
element UIElement

The element to which the attached property is written.

value double

The value to set.

SetArrangeState(UIElement, ArrangeState)

Sets the value of the ArrangeStateProperty attached property to the specified object.

public static void SetArrangeState(UIElement element, ArrangeState value)
Parameter Type Description
element UIElement

The element to which the attached property is written.

value ArrangeState

The value to set.

SetArrangeWidthAnimated(UIElement, double)

Sets the value of the ArrangeWidthAnimatedProperty attached property to the specified object.

public static void SetArrangeWidthAnimated(UIElement element, double value)
Parameter Type Description
element UIElement

The element to which the attached property is written.

value double

The value to set.

SetArrangeXAnimated(UIElement, double)

Sets the value of the ArrangeXAnimatedProperty attached property to the specified object.

public static void SetArrangeXAnimated(UIElement element, double value)
Parameter Type Description
element UIElement

The element to which the attached property is written.

value double

The value to set.

SetArrangeYAnimated(UIElement, double)

Sets the value of the ArrangeYAnimatedProperty attached property to the specified object.

public static void SetArrangeYAnimated(UIElement element, double value)
Parameter Type Description
element UIElement

The element to which the attached property is written.

value double

The value to set.

SetIsAnimated(UIElement, bool)

Sets the value of the IsAnimatedProperty attached property to the specified object.

public static void SetIsAnimated(UIElement element, bool value)
Parameter Type Description
element UIElement

The element to which the attached property is written.

value bool

The value to set.

Fields

AnimationCountProperty

Identifies the AnimationCount dependency property. This field is read-only.

public static readonly DependencyProperty AnimationCountProperty

AreLeavingElementsAnimatedProperty

Identifies the AreLeavingElementsAnimated dependency property. This field is read-only.

public static readonly DependencyProperty AreLeavingElementsAnimatedProperty

ArrangeAnimationProperty

Identifies the ArrangeAnimation dependency property. This field is read-only.

public static readonly DependencyProperty ArrangeAnimationProperty

ArrangeHeightAnimatedProperty

Identifies the ArrangeHeightAnimated dependency property. This field is read-only.

public static readonly DependencyProperty ArrangeHeightAnimatedProperty

ArrangeStateProperty

Identifies the ArrangeState dependency property. This field is read-only.

public static readonly DependencyProperty ArrangeStateProperty

ArrangeWidthAnimatedProperty

Identifies the ArrangeWidthAnimated dependency property. This field is read-only.

public static readonly DependencyProperty ArrangeWidthAnimatedProperty

ArrangeXAnimatedProperty

Identifies the ArrangeXAnimated dependency property. This field is read-only.

public static readonly DependencyProperty ArrangeXAnimatedProperty

ArrangeYAnimatedProperty

Identifies the ArrangeYAnimated dependency property. This field is read-only.

public static readonly DependencyProperty ArrangeYAnimatedProperty

IsAnimatedProperty

Identifies the IsAnimated dependency property. This field is read-only.

public static readonly DependencyProperty IsAnimatedProperty

IsLayoutUpdatePendingProperty

Identifies the read-only IsLayoutUpdatePending dependency property. This field is read-only.

public static readonly DependencyProperty IsLayoutUpdatePendingProperty