Table of Contents

Class MagnetView

Namespace
Nalu.MagnetLayout
Assembly
Nalu.Maui.Layouts.dll

Represents a view in a Magnet layout.

public class MagnetView : MagnetElementBase<MagnetView.ConstraintTypes>, INotifyPropertyChanged, IMagnetView, IMagnetElement, IMagnetElementBase, IHorizontalPoles, IVerticalPoles, IHorizontalChainPoles, IVerticalChainPoles
Inheritance
MagnetView
Implements
Inherited Members
Extension Methods

Constructors

MagnetView()

Initializes a new instance of the MagnetView class.

public MagnetView()

Fields

BottomToProperty

Bindable property for the BottomTo property.

public static readonly BindableProperty BottomToProperty

Field Value

BindableProperty

CollapsedMarginProperty

Bindable property for the CollapsedMargin property.

public static readonly BindableProperty CollapsedMarginProperty

Field Value

BindableProperty

HeightProperty

Bindable property for the Height property.

public static readonly BindableProperty HeightProperty

Field Value

BindableProperty

HorizontalBiasProperty

Bindable property for the HorizontalBias property.

public static readonly BindableProperty HorizontalBiasProperty

Field Value

BindableProperty

LeftToProperty

Bindable property for the LeftTo property.

public static readonly BindableProperty LeftToProperty

Field Value

BindableProperty

MarginProperty

Bindable property for the Margin property.

public static readonly BindableProperty MarginProperty

Field Value

BindableProperty

RightToProperty

Bindable property for the RightTo property.

public static readonly BindableProperty RightToProperty

Field Value

BindableProperty

TopToProperty

Bindable property for the TopTo property.

public static readonly BindableProperty TopToProperty

Field Value

BindableProperty

VerticalBiasProperty

Bindable property for the VerticalBias property.

public static readonly BindableProperty VerticalBiasProperty

Field Value

BindableProperty

WidthProperty

Bindable property for the Width property.

public static readonly BindableProperty WidthProperty

Field Value

BindableProperty

Properties

Bottom

Gets the bottom position of the view.

public double Bottom { get; }

Property Value

double

BottomTo

Gets or sets the VerticalPullTarget to which the bottom side of this view will be attracted to.

public VerticalPullTarget? BottomTo { get; set; }

Property Value

VerticalPullTarget

Collapsed

Gets the visibility of the view.

public bool Collapsed { get; }

Property Value

bool

CollapsedMargin

Gets or sets the view margins when the pull target has Visibility set to Collapsed.

public Thickness CollapsedMargin { get; set; }

Property Value

Thickness

Height

Gets or sets the height sizing strategy for this view.

public SizeValue Height { get; set; }

Property Value

SizeValue

HorizontalBias

Gets or sets the horizontal positioning bias for this view.

public double HorizontalBias { get; set; }

Property Value

double

Remarks

This is only effective when the Width is set to Constraint.

Left

Gets the left position of the view.

public double Left { get; }

Property Value

double

LeftTo

Gets or sets the HorizontalPullTarget to which the left side of this view will be attracted to.

public HorizontalPullTarget? LeftTo { get; set; }

Property Value

HorizontalPullTarget

Margin

Gets or sets the view margins

public Thickness Margin { get; set; }

Property Value

Thickness

Right

Gets the right position of the view.

public double Right { get; }

Property Value

double

RightTo

Gets or sets the HorizontalPullTarget to which the right side of this view will be attracted to.

public HorizontalPullTarget? RightTo { get; set; }

Property Value

HorizontalPullTarget

Top

Gets the top position of the view.

public double Top { get; }

Property Value

double

TopTo

Gets or sets the VerticalPullTarget to which the top side of this view will be attracted to.

public VerticalPullTarget? TopTo { get; set; }

Property Value

VerticalPullTarget

VerticalBias

Gets or sets the horizontal positioning bias for this view.

public double VerticalBias { get; set; }

Property Value

double

Remarks

This is only effective when the Width is set to Constraint.

Width

Gets or sets the width sizing strategy for this view.

public SizeValue Width { get; set; }

Property Value

SizeValue

Methods

ApplyConstraints(IMagnetStage)

Applies the constraints for the element.

protected override void ApplyConstraints(IMagnetStage stage)

Parameters

stage IMagnetStage

DetectChanges(IMagnetStage)

Detects eventual changes and notifies dependent elements.

protected override void DetectChanges(IMagnetStage stage)

Parameters

stage IMagnetStage

FinalizeConstraints(IMagnetStage)

Eventually adds more constraints, or changes editable variables to complete the layout process.

protected override void FinalizeConstraints(IMagnetStage stage)

Parameters

stage IMagnetStage

GetEditableVariables()

Gets the editable variables for the element.

protected override (Variable Variable, double Strength)[] GetEditableVariables()

Returns

(Variable Variable, double Strength)[]

SetVariableNames(string)

Initializes the variables for the element given the chosen element identifier.

protected override void SetVariableNames(string id)

Parameters

id string