예제 #1
0
 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
     };
 }
예제 #2
0
        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;
            }
        }
예제 #3
0
 public ApplicationHostLogical(TreeNode owner, Controls.Application host) :
     base(owner)
 {
     _application = host;
 }