chore: add avalonia ListBox demo.
This commit is contained in:
1 parent
98b67b3fd5
commit
29cf68d8ec
7 files changed
+157
-58
No files matched your search
@@ -12,6 +12,36 @@ namespace HandyControlDemo.Service;
|
||||
|
||||
public class DataService
|
||||
{
|
||||
internal List<DemoDataModel> GetDemoDataList()
|
||||
{
|
||||
var list = new List<DemoDataModel>();
|
||||
for (int i = 1; i <= 20; i++)
|
||||
{
|
||||
var dataList = new List<DemoDataModel>();
|
||||
for (int j = 0; j < 3; j++)
|
||||
{
|
||||
dataList.Add(new DemoDataModel
|
||||
{
|
||||
Index = j, IsSelected = j % 2 == 0, Name = $"SubName{j}", Type = (DemoType)j
|
||||
});
|
||||
}
|
||||
|
||||
var model = new DemoDataModel
|
||||
{
|
||||
Index = i,
|
||||
IsSelected = i % 2 == 0,
|
||||
Name = $"Name{i}",
|
||||
Type = (DemoType)(i % 6 + 1),
|
||||
DataList = dataList,
|
||||
ImgPath = $"/HandyControlDemo;component/Resources/Img/Avatar/avatar{i % 6 + 1}.png",
|
||||
Remark = new string(i.ToString()[0], 10)
|
||||
};
|
||||
list.Add(model);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
internal List<DemoInfoModel> GetDemoInfo()
|
||||
{
|
||||
var infoList = new List<DemoInfoModel>();
|
||||
|
||||
Reference in new issue
Block a user