A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
900 B

// -----------------------------------------------------------------------
// <copyright file="LogicalTreeNode.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.Diagnostics.ViewModels
{
using System;
using Perspex.Controls;
using ReactiveUI;
internal class LogicalTreeNode : TreeNode
{
public LogicalTreeNode(ILogical logical)
: base((Control)logical)
{
this.Children = logical.LogicalChildren.CreateDerivedCollection(x => new LogicalTreeNode(x));
}
public static LogicalTreeNode[] Create(object control)
{
var logical = control as ILogical;
return logical != null ? new[] { new LogicalTreeNode(logical) } : null;
}
}
}