Struct MagnetTarget
- Namespace
- Nalu
- Assembly
- Nalu.Maui.Layouts.dll
A target node with an optional margin, used by the relative shortcuts (After, Below, AlignLeft, …).
[TypeConverter(typeof(MagnetTargetTypeConverter))]
public readonly record struct MagnetTarget : IEquatable<MagnetTarget>
- Implements
- Inherited Members
Remarks
String form (implicit conversion): "avatar", "avatar,12", "avatar,12,0" or "avatar,12,gone:0".
Constructors
MagnetTarget(string, double, double?)
A target node with an optional margin, used by the relative shortcuts (After, Below, AlignLeft, …).
public MagnetTarget(string Target, double Margin = 0, double? GoneMargin = null)
Parameters
TargetstringMargindoubleThe margin between the anchored side and the target.
GoneMargindouble?The margin used when the target view is collapsed (defaults to
Margin).
Remarks
String form (implicit conversion): "avatar", "avatar,12", "avatar,12,0" or "avatar,12,gone:0".
Properties
GoneMargin
The margin used when the target view is collapsed (defaults to Margin).
public double? GoneMargin { get; init; }
Property Value
Margin
The margin between the anchored side and the target.
public double Margin { get; init; }
Property Value
Target
public string Target { get; init; }
Property Value
Methods
Parse(string)
Parses the string representation of a target.
public static MagnetTarget Parse(string value)
Parameters
valuestring
Returns
To(MagnetPole)
Builds the anchor to the given pole of this target.
public MagnetAnchor To(MagnetPole pole)
Parameters
poleMagnetPole
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
implicit operator MagnetTarget(string)
Implicitly parses the string representation of a target.
public static implicit operator MagnetTarget(string value)
Parameters
valuestring