This commit is contained in:
GG Z
2025-07-31 20:12:24 +08:00
parent 4f6cd2137c
commit f209e7d3ad
426 changed files with 15854 additions and 6612 deletions

View File

@@ -0,0 +1,50 @@
using System.Collections.Generic;
using System.Windows;
namespace NeuWPFTest
{
/// <summary>
/// ControlTestWindow.xaml 的交互逻辑
/// </summary>
public partial class ControlTestWindow : Window
{
public ControlTestWindow()
{
InitializeComponent();
SetViewData();
SetItemsData();
}
private void SetViewData()
{
var i1 = new TreeData("1111");
i1.Children = new List<TreeData>
{
new TreeData("AAA"),
new TreeData("BBB")
};
List<TreeData> datalist = new()
{
i1,
new TreeData("2222"),
new TreeData("3333")
};
myTreeView.ItemsSource = datalist;
OldTreeView.ItemsSource = datalist;
}
private void SetItemsData()
{
}
}
public class TreeData
{
public TreeData(string name)
{
ItemName = name;
}
public string ItemName { get; set; }
public List<TreeData> Children { get; set; } = new List<TreeData>();
}
}