In This Article

SwitchPanel Class

Represents a panel that delegates the positioning of the child elements to one or more child panels.

public class SwitchPanel : PanelBase, ILogicalParent, IVisualParent
Inheritance:
object Visual UIElement FrameworkElement Panel PanelBase object
Implements:
ILogicalParent IVisualParent

Constructors

SwitchPanel()

Initializes an instance of the class.

public SwitchPanel()

Properties

ActiveIndex

The index of the PanelBase from the Panels collection that is active.

public int ActiveIndex { get; set; }

Property Value

int:

The default value is 0.

ActivePanel

The PanelBase from the Panels collection that is active.

public PanelBase? ActivePanel { get; }

Property Value

PanelBase

ArrangeAnimationResolved

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

public override IArrangeAnimation? ArrangeAnimationResolved { get; }

Property Value

IArrangeAnimation

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.

Panels

The panels that can be used to layout the children.

public DeferrableObservableCollection<PanelBase> Panels { get; }

Property Value

DeferrableObservableCollection<PanelBase>

Methods

ArrangeElements(IList<UIElement>, Size)

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

public override 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.

MeasureElements(IList<UIElement>, Size)

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

public override 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.

Fields

ActiveIndexProperty

Defines the ActiveIndex property.

public static readonly DependencyProperty ActiveIndexProperty

ActivePanelProperty

Defines the ActivePanel property.

public static readonly DependencyProperty ActivePanelProperty

Inherited Members

Extension Methods