Class ViewBoxBase
- Namespace
 - Nalu
 
- Assembly
 - Nalu.Maui.Layouts.dll
 
ViewBoxBase is a base class a IViewBox that is used to display a single view.
public abstract class ViewBoxBase : View, INotifyPropertyChanged, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, IViewBox, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout, ISafeAreaView
  - Inheritance
 - 
      
      
      
      
      
      
      
      ViewBoxBase
 
- Implements
 
- Derived
 
- Inherited Members
 
Fields
ContentBindingContextProperty
Bindable property for ContentBindingContext property.
public static readonly BindableProperty ContentBindingContextProperty
  Field Value
PaddingProperty
Bindable property for Padding property.
public static readonly BindableProperty PaddingProperty
  Field Value
Properties
ContentBindingContext
Gets or sets the BindingContext to force on the content view.
public object? ContentBindingContext { get; set; }
  Property Value
Examples
<ContentLayout ContentBindingContext="{Binding CurrentAnimal}">
    <AnimalView x:DataType="models:Animal" />
</ContentLayout>
  Remarks
This helps to fulfill interface segregation principle by allowing the content view to be bound to a property of the parent's binding context.
Padding
Gets or sets the padding around the content.
public Thickness Padding { get; set; }
  Property Value
PresentedContent
Gets the content of this view as it will be rendered in the user interface, including any transformations or applied templates.
public IView? PresentedContent { get; }
  Property Value
Methods
ContentBindingContextPropertyChanged(object?, object?)
Updates the binding context of the content view.
protected virtual void ContentBindingContextPropertyChanged(object? oldvalue, object? newvalue)
  Parameters
CreateLayoutManager()
Creates a manager object that can measure this container and arrange its content.
protected virtual ILayoutManager CreateLayoutManager()
  Returns
- ILayoutManager
 The instance of the layout manager.
GetContent()
Gets the content.
protected virtual IView? GetContent()
  Returns
OnContentPropertyChanged(IView?, IView?)
Sets the content of the layout.
protected virtual void OnContentPropertyChanged(IView? oldView, IView? newView)
  Parameters
OnPaddingPropertyChanged(Thickness, Thickness)
Triggered when the Padding property changes.
protected virtual void OnPaddingPropertyChanged(Thickness oldValue, Thickness newValue)
  Parameters
SetContent(IView?)
Sets the content.
protected virtual void SetContent(IView? content)
  Parameters
contentIViewThe new content.
TriggerContentChanged(IView?, IView?)
Triggers the ContentChanged event.
protected void TriggerContentChanged(IView? oldView, IView? newView)
  Parameters
Events
ContentChanged
Triggered when the content changes.
public event EventHandler<ViewBoxContentChangedEventArgs>? ContentChanged