Class ExpanderViewBox
- Namespace
 - Nalu
 
- Assembly
 - Nalu.Maui.Layouts.dll
 
Represents a view box that can be expanded or collapsed with an animation.
[ContentProperty("Content")]
public class ExpanderViewBox : ViewBoxBase, INotifyPropertyChanged, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, ISafeAreaView, IExpanderViewBox, IViewBox, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout, IDisposable
  - Inheritance
 - 
      
      
      
      
      
      
      
      
      ExpanderViewBox
 
- Implements
 
- Inherited Members
 
Fields
AnimationBehaviorProperty
Bindable property for AnimationBehavior property.
public static readonly BindableProperty AnimationBehaviorProperty
  Field Value
CanCollapseProperty
Bindable property for CanCollapse property.
public static readonly BindableProperty CanCollapseProperty
  Field Value
CollapsedHeightProperty
Bindable property for CollapsedHeight property.
public static readonly BindableProperty CollapsedHeightProperty
  Field Value
CollapsedWidthProperty
Bindable property for CollapsedWidth property.
public static readonly BindableProperty CollapsedWidthProperty
  Field Value
ContentProperty
Bindable property for Content property.
public static readonly BindableProperty ContentProperty
  Field Value
IsExpandedProperty
Bindable property for IsExpanded property.
public static readonly BindableProperty IsExpandedProperty
  Field Value
Properties
AnimationBehavior
Gets or sets the behavior of the expander animation.
public ExpanderAnimationBehavior AnimationBehavior { get; set; }
  Property Value
CanCollapse
Gets a value indicating whether the content will collapse when the view box is not expanded.
public bool CanCollapse { get; }
  Property Value
CollapsedHeight
Gets the height of the view box when it is collapsed vertically.
public double CollapsedHeight { get; set; }
  Property Value
Remarks
-1 means the expander does not collapse vertically.
CollapsedWidth
Gets the width of the view box when it is collapsed horizontally.
public double CollapsedWidth { get; set; }
  Property Value
Remarks
-1 means the expander does not collapse horizontally.
Content
Gets or sets the content of the view box.
public IView? Content { get; set; }
  Property Value
IsExpanded
Gets or sets a value indicating whether the view box is expanded.
public bool IsExpanded { get; set; }
  Property Value
Remarks
The view box is expanded by default.
Methods
ArrangeOverride(Rect)
Allows subclasses to implement custom Arrange logic during a controls layout pass.
protected override Size ArrangeOverride(Rect bounds)
  Parameters
boundsRectThe new bounds of the element.
Returns
- Size
 The resulting size of this element's frame by the platform.
Remarks
Subclasses will stil want to call ArrangeOverride(Rect) on the base class or call PlatformArrange(Rect) on the Handler .
CreateLayoutManager()
Creates a manager object that can measure this container and arrange its content.
protected override ILayoutManager CreateLayoutManager()
  Returns
- ILayoutManager
 The instance of the layout manager.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
  Dispose(bool)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
protected virtual void Dispose(bool disposing)
  Parameters
disposingbool
GetContent()
Gets the content.
protected override IView? GetContent()
  Returns
OnBindingContextChanged()
Invoked whenever the binding context of the View changes.
protected override void OnBindingContextChanged()
  Remarks
This method can be overridden to add class handling for this event. Overrides must call the base method.
OnHandlerChanged()
When overridden in a derived class, should raise the HandlerChanged event.
protected override void OnHandlerChanged()
  Remarks
It is the implementor's responsibility to raise the HandlerChanged event.
SetContent(IView?)
Sets the content.
protected override void SetContent(IView? content)
  Parameters
contentIViewThe new content.