Table of Contents

Class MagnetNode

Namespace
Nalu
Assembly
Nalu.Maui.Layouts.dll

Base class of every element of a MagnetDefinition.

public abstract class MagnetNode : INotifyPropertyChanged
Inheritance
MagnetNode
Implements
Derived
Inherited Members

Remarks

Nodes are plain INotifyPropertyChanged objects, not BindableObjects: they live outside the visual tree, so no BindingContext reaches them — they can act as a binding SOURCE but not as a binding target. Mutate them directly (optionally inside Magnet.TransitionToAsync to animate the change).

Properties

MagnetId

Gets or sets the identifier of this node. Required and unique within a MagnetDefinition.

public string? MagnetId { get; set; }

Property Value

string

Remarks

This is the only identity of a node: nothing falls back to AutomationId. It should not be changed after registration.

Methods

Notify(MagnetChange)

Notifies the owner about a change.

protected void Notify(MagnetChange change)

Parameters

change MagnetChange

OnPropertyChanged(string?)

protected void OnPropertyChanged(string? propertyName = null)

Parameters

propertyName string

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Events

PropertyChanged

Occurs when a property value changes.

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler