Table of Contents

Class LogicalTreeAttachmentEventArgs

Namespace
Avalonia.LogicalTree
Assembly
Avalonia.Base.dll

Holds the event arguments for the AttachedToLogicalTree and DetachedFromLogicalTree events.

public class LogicalTreeAttachmentEventArgs : EventArgs
Inheritance
LogicalTreeAttachmentEventArgs
Inherited Members

Constructors

LogicalTreeAttachmentEventArgs(ILogicalRoot, ILogical, ILogical?)

Initializes a new instance of the LogicalTreeAttachmentEventArgs class.

public LogicalTreeAttachmentEventArgs(ILogicalRoot root, ILogical source, ILogical? parent)

Parameters

root ILogicalRoot

The root of the logical tree.

source ILogical

The control being attached/detached.

parent ILogical

The Parent.

Properties

Parent

Gets the control that Source is being attached to or detached from.

public ILogical? Parent { get; }

Property Value

ILogical

Remarks

For logical tree attachment, holds the new logical parent of Source. For detachment, holds the old logical parent of Source. If the detachment event was caused by a top-level control being closed, then this property will be null.

Root

Gets the root of the logical tree that the control is being attached to or detached from.

public ILogicalRoot Root { get; }

Property Value

ILogicalRoot

Source

Gets the control that was attached or detached from the logical tree.

public ILogical Source { get; }

Property Value

ILogical

Remarks

Logical tree attachment events travel down the attached logical tree from the point of attachment/detachment, so this control may be different from the control that the event is being raised on.