SwitchPanel Class
Represents a panel that delegates the positioning of the child elements to one or more child panels.
public class SwitchPanel : PanelBase, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, ILogicalParent, IVisualParent
- Inheritance:
- Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Panel PanelBase Object
- Implements:
- ILogicalParent IVisualParent
Constructors
SwitchPanel()
Initializes a new instance of the SwitchPanel class.
public SwitchPanel()
Properties
ActiveIndex
Gets or sets the index of the PanelBase from the Panels collection that is active. This is a dependency property.
public int ActiveIndex { get; set; }
Property Value
ActivePanel
public PanelBase ActivePanel { get; }
Property Value
ArrangeAnimationResolved
Gets resolved IArrangeAnimation that controls the animation of elements when arranging.
public override 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.
Panels
Gets or sets the panels that can be used to layout the children.
public DeferrableObservableCollection<PanelBase> Panels { get; }
Property Value
- DeferrableObservableCollection<PanelBase>:
The panels that can be used to layout the children.
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
Identifies the ActiveIndex dependency property. This field is read-only.
public static readonly DependencyProperty ActiveIndexProperty
ActivePanelProperty
Identifies the read-only ActivePanel dependency property. This field is read-only.
public static readonly DependencyProperty ActivePanelProperty
Inherited Members
- PanelBase.AnimationCountProperty
- PanelBase.ArrangeAnimationProperty
- PanelBase.ArrangeHeightAnimatedProperty
- PanelBase.ArrangeStateProperty
- PanelBase.ArrangeWidthAnimatedProperty
- PanelBase.ArrangeXAnimatedProperty
- PanelBase.ArrangeYAnimatedProperty
- PanelBase.IsAnimatedProperty
- PanelBase.IsLayoutUpdatePendingProperty
- PanelBase.AreLeavingElementsAnimatedProperty
- PanelBase.ArrangeElement(UIElement, Boolean)
- PanelBase.ArrangeElement(UIElement, Nullable<Rect>, Boolean)
- PanelBase.ArrangeElement(PanelBase, UIElement, Boolean)
- PanelBase.ArrangeElement(PanelBase, UIElement, Nullable<Rect>, Boolean)
- PanelBase.GetArrangeHeightAnimated(UIElement)
- PanelBase.SetArrangeHeightAnimated(UIElement, Double)
- PanelBase.ArrangeOverride(Size)
- PanelBase.GetArrangeRectAnimated(UIElement)
- PanelBase.GetArrangeState(UIElement)
- PanelBase.SetArrangeState(UIElement, ArrangeState)
- PanelBase.GetArrangeWidthAnimated(UIElement)
- PanelBase.SetArrangeWidthAnimated(UIElement, Double)
- PanelBase.GetArrangeXAnimated(UIElement)
- PanelBase.SetArrangeXAnimated(UIElement, Double)
- PanelBase.GetArrangeYAnimated(UIElement)
- PanelBase.SetArrangeYAnimated(UIElement, Double)
- PanelBase.GetIsAnimated(UIElement)
- PanelBase.SetIsAnimated(UIElement, Boolean)
- PanelBase.MeasureOverride(Size)
- PanelBase.ILogicalParent.AddLogicalChild(Object)
- PanelBase.ILogicalParent.RemoveLogicalChild(Object)
- PanelBase.IVisualParent.AddVisualChild(Visual)
- PanelBase.IVisualParent.RemoveVisualChild(Visual)
- PanelBase.GetVisualChild(Int32)
- PanelBase.OnVisualChildrenChanged(DependencyObject, DependencyObject)
- PanelBase.ArrangeAnimation
- PanelBase.IsLayoutUpdatePending
- PanelBase.AreLeavingElementsAnimated
- PanelBase.HasLeavingChildren
- PanelBase.LeavingChildren
- PanelBase.VisualChildrenCount
- Object.ToString()
- Object.Equals(Object)
- Object.Equals(Object, Object)
- Object.ReferenceEquals(Object, Object)
- Object.GetHashCode()
- Object.GetType()
- Object.MemberwiseClone()
Extension Methods
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()