public LogicalTreeNode(IAvaloniaObject avaloniaObject, TreeNode?parent) : base(avaloniaObject, parent) { Children = avaloniaObject switch { ILogical logical => new LogicalTreeNodeCollection(this, logical), Controls.Application host => new ApplicationHostLogical(this, host), _ => TreeNodeCollection.Empty }; }
public VisualTreeNode(IAvaloniaObject avaloniaObject, TreeNode?parent, string?customName = null) : base(avaloniaObject, parent, customName) { Children = avaloniaObject switch { IVisual visual => new VisualTreeNodeCollection(this, visual), Controls.Application host => new ApplicationHostVisuals(this, host), _ => TreeNodeCollection.Empty }; if (Visual is IStyleable styleable) { IsInTemplate = styleable.TemplatedParent != null; } }
public ApplicationHostLogical(TreeNode owner, Controls.Application host) : base(owner) { _application = host; }