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
CollapsedMarginProperty
Bindable property for the CollapsedMargin property.
public static readonly BindableProperty CollapsedMarginProperty
Field Value
HeightProperty
Bindable property for the Height property.
public static readonly BindableProperty HeightProperty
Field Value
HorizontalBiasProperty
Bindable property for the HorizontalBias property.
public static readonly BindableProperty HorizontalBiasProperty
Field Value
LeftToProperty
Bindable property for the LeftTo property.
public static readonly BindableProperty LeftToProperty
Field Value
MarginProperty
Bindable property for the Margin property.
public static readonly BindableProperty MarginProperty
Field Value
RightToProperty
Bindable property for the RightTo property.
public static readonly BindableProperty RightToProperty
Field Value
TopToProperty
Bindable property for the TopTo property.
public static readonly BindableProperty TopToProperty
Field Value
VerticalBiasProperty
Bindable property for the VerticalBias property.
public static readonly BindableProperty VerticalBiasProperty
Field Value
WidthProperty
Bindable property for the Width property.
public static readonly BindableProperty WidthProperty
Field Value
Properties
Bottom
Gets the bottom position of the view.
public double Bottom { get; }
Property Value
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
Collapsed
Gets the visibility of the view.
public bool Collapsed { get; }
Property Value
CollapsedMargin
Gets or sets the view margins when the pull target has Visibility set to Collapsed.
public Thickness CollapsedMargin { get; set; }
Property Value
Height
Gets or sets the height sizing strategy for this view.
public SizeValue Height { get; set; }
Property Value
HorizontalBias
Gets or sets the horizontal positioning bias for this view.
public double HorizontalBias { get; set; }
Property Value
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
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
Margin
Gets or sets the view margins
public Thickness Margin { get; set; }
Property Value
Right
Gets the right position of the view.
public double Right { get; }
Property Value
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
Top
Gets the top position of the view.
public double Top { get; }
Property Value
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
VerticalBias
Gets or sets the horizontal positioning bias for this view.
public double VerticalBias { get; set; }
Property Value
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
Methods
ApplyConstraints(IMagnetStage)
Applies the constraints for the element.
protected override void ApplyConstraints(IMagnetStage stage)
Parameters
stageIMagnetStage
DetectChanges(IMagnetStage)
Detects eventual changes and notifies dependent elements.
protected override void DetectChanges(IMagnetStage stage)
Parameters
stageIMagnetStage
FinalizeConstraints(IMagnetStage)
Eventually adds more constraints, or changes editable variables to complete the layout process.
protected override void FinalizeConstraints(IMagnetStage stage)
Parameters
stageIMagnetStage
GetEditableVariables()
Gets the editable variables for the element.
protected override (Variable Variable, double Strength)[] GetEditableVariables()
Returns
SetVariableNames(string)
Initializes the variables for the element given the chosen element identifier.
protected override void SetVariableNames(string id)
Parameters
idstring