Class Magnet
- Namespace
 - Nalu
 
- Assembly
 - Nalu.Maui.Layouts.dll
 
A Layout that uses the magnet layout system where each element is positioned based on a set of constraints.
public class Magnet : Layout, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, IBindableLayout, IVisualTreeElement, IStackLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout
  - Inheritance
 - 
      
      
      
      
      
      
      
      
      Magnet
 
- Implements
 
- Inherited Members
 
Fields
StageIdProperty
The bindable property for the StageId attached property.
public static readonly BindableProperty StageIdProperty
  Field Value
StageProperty
The bindable property for the IMagnetStage property.
public static readonly BindableProperty StageProperty
  Field Value
Properties
Stage
Gets or sets the IMagnetStage for this layout.
public IMagnetStage? Stage { get; set; }
  Property Value
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 layout and arrange its children.
protected override ILayoutManager CreateLayoutManager()
  Returns
- ILayoutManager
 An object that implements ILayoutManager that manages this layout.
GetStageId(BindableObject)
Gets the StageId attached property.
public static string? GetStageId(BindableObject view)
  Parameters
viewBindableObjectThe view to get the property from.
Returns
- string
 The identifier.
GetStageId(IView)
Gets the stage Id for the specified view.
public static string? GetStageId(IView view)
  Parameters
viewIViewThe view to get the property from.
Returns
- string
 The identifier.
MeasureOverride(double, double)
Allows subclasses to implement custom Measure logic during a controls measure pass.
protected override Size MeasureOverride(double widthConstraint, double heightConstraint)
  Parameters
widthConstraintdoubleThe width constraint to request.
heightConstraintdoubleThe height constraint to request.
Returns
- Size
 The requested size that an element wants in order to be displayed on the device.
SetStageId(BindableObject, string?)
Sets the StageId attached property.
public static void SetStageId(BindableObject view, string? value)
  Parameters
viewBindableObjectThe view to set the property on.
valuestringThe identifier.
SetStageId(IView, string?)
Sets the stage Id for the specified view.
public static void SetStageId(IView view, string? id)