Table of Contents

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

Target string

The MagnetId of the target node, or Parent.

Margin double

The margin between the anchored side and the target.

GoneMargin double?

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

double?

Margin

The margin between the anchored side and the target.

public double Margin { get; init; }

Property Value

double

Target

The MagnetId of the target node, or Parent.

public string Target { get; init; }

Property Value

string

Methods

Parse(string)

Parses the string representation of a target.

public static MagnetTarget Parse(string value)

Parameters

value string

Returns

MagnetTarget

To(MagnetPole)

Builds the anchor to the given pole of this target.

public MagnetAnchor To(MagnetPole pole)

Parameters

pole MagnetPole

Returns

MagnetAnchor

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

value string

Returns

MagnetTarget