Skip to main content

LogicalTreeAttachmentEventArgs Class

Definition​

Assembly:Avalonia.Base
Package:Avalonia
public class LogicalTreeAttachmentEventArgs

Inheritance: EventArgs -> LogicalTreeAttachmentEventArgs

Constructors​

NameDescription
LogicalTreeAttachmentEventArgsInitializes a new instance of the Avalonia.LogicalTree.LogicalTreeAttachmentEventArgs class.

LogicalTreeAttachmentEventArgs Constructor​

Initializes a new instance of the Avalonia.LogicalTree.LogicalTreeAttachmentEventArgs class.

public LogicalTreeAttachmentEventArgs(Avalonia.LogicalTree.ILogicalRoot root, Avalonia.LogicalTree.ILogical source, Avalonia.LogicalTree.ILogical parent)

Parameters​

root Avalonia.LogicalTree.ILogicalRoot

The root of the logical tree.

source Avalonia.LogicalTree.ILogical

The control being attached/detached.

parent Avalonia.LogicalTree.ILogical

The Avalonia.LogicalTree.LogicalTreeAttachmentEventArgs.Parent.

Properties​

NameDescription
ParentGets the control that Avalonia.LogicalTree.LogicalTreeAttachmentEventArgs.Source is being attached to or detached from.
RootGets the root of the logical tree that the control is being attached to or detached from.
SourceGets the control that was attached or detached from the logical tree.

Parent Property​

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

public Avalonia.LogicalTree.ILogical Parent { get; set; }

Remarks​

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

Root Property​

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

public Avalonia.LogicalTree.ILogicalRoot Root { get; set; }

Source Property​

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

public Avalonia.LogicalTree.ILogical Source { get; set; }

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.