New to Telerik UI for .NET MAUIStart a free 30-day trial

Provides a base class for objects that can be attached to and detached from an owner object.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Type Parameters:

T

The type of the owner object.

Syntax:

C#
public abstract class AttachableObject<T> : BindableObject where T : class

Inheritance: objectAttachableObject<T>

Derived Classes: ControlCommandBase<T>ServiceBase<T>

Constructors

Initializes a new instance of the AttachableObject<T> class.

C#
protected AttachableObject()

Properties

Gets the owner object that this attachable object is associated with.

C#
public T Owner { get; protected set; }
Property Value:

The owner object.

Methods

Called when this object is attached to a new owner.

C#
protected virtual void OnAttached()

Called when this object is detached from its owner.

C#
protected virtual void OnDetached(T previousOwner)
Parameters:previousOwnerT

The previous owner object.