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
Properties
HeightRequest
The requested stage height.
double HeightRequest { get; }
Property Value
WidthRequest
The requested stage width.
double WidthRequest { get; }
Property Value
Methods
AddConstraint(Constraint)
Adds a constraint to the stage.
void AddConstraint(Constraint constraint)
Parameters
constraintConstraint
AddEditVariable(Variable, double)
Adds an editable variable to the stage.
void AddEditVariable(Variable variable, double strength)
Parameters
GetElement(string)
Gets the element associated with the given identifier.
IMagnetElementBase GetElement(string identifier)
Parameters
identifierstring
Returns
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
PrepareForMeasure(double, double)
Applies the constraints and solves the layout.
void PrepareForMeasure(double width, double height)
Parameters
RemoveConstraint(Constraint)
Removes a constraint from the stage.
void RemoveConstraint(Constraint constraint)
Parameters
constraintConstraint
RemoveEditVariable(Variable)
Removes an editable variable from the stage.
void RemoveEditVariable(Variable variable)
Parameters
variableVariable
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
TryGetElement(string, out IMagnetElementBase?)
Tries to get the element associated with the given identifier.
bool TryGetElement(string identifier, out IMagnetElementBase? element)
Parameters
identifierstringelementIMagnetElementBase