Table of Contents

Interface IMagnetStage

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

Represent the stage of the magnet layout on which elements can be positioned.

public interface IMagnetStage : IVerticalPoles, IHorizontalPoles, IMagnetElementBase
Inherited Members
Extension Methods

Fields

StageId

The reserved unique identifier for the stage.

public const string StageId = "Stage"

Field Value

string

Properties

HeightRequest

The requested stage height.

double HeightRequest { get; }

Property Value

double

WidthRequest

The requested stage width.

double WidthRequest { get; }

Property Value

double

Methods

AddConstraint(Constraint)

Adds a constraint to the stage.

void AddConstraint(Constraint constraint)

Parameters

constraint Constraint

AddEditVariable(Variable, double)

Adds an editable variable to the stage.

void AddEditVariable(Variable variable, double strength)

Parameters

variable Variable

The editable variable.

strength double

The strength, defaults to Strong

GetElement(string)

Gets the element associated with the given identifier.

IMagnetElementBase GetElement(string identifier)

Parameters

identifier string

Returns

IMagnetElementBase

Invalidate()

Invalidates the scene due to changed constraints.

void Invalidate()

PrepareForArrange(double, double)

Arranges the elements on the stage based on the solved layout.

void PrepareForArrange(double width, double height)

Parameters

width double
height double

PrepareForMeasure(double, double)

Applies the constraints and solves the layout.

void PrepareForMeasure(double width, double height)

Parameters

width double
height double

RemoveConstraint(Constraint)

Removes a constraint from the stage.

void RemoveConstraint(Constraint constraint)

Parameters

constraint Constraint

RemoveEditVariable(Variable)

Removes an editable variable from the stage.

void RemoveEditVariable(Variable variable)

Parameters

variable Variable

SuggestValue(Variable, double)

Suggests a value for the given editable variable based on the measured width and the size width.

void SuggestValue(Variable variable, double value)

Parameters

variable Variable
value double

TryGetElement(string, out IMagnetElementBase?)

Tries to get the element associated with the given identifier.

bool TryGetElement(string identifier, out IMagnetElementBase? element)

Parameters

identifier string
element IMagnetElementBase

Returns

bool