update to v1.3.4

1. add datagrid style
2. improve the numericupdown
3. add checkbox style
4. add listbox demo
5. add treeview demo
6. add border demo
7. remove angle property of iconelement
8. add menu demo
This commit is contained in:
NaBian committed 2018-10-19 14:47:43 +08:00
1 parent 8997e418f7
commit 880a0eefba
89 files changed
+1707 -216

No files matched your search

@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Windows.Controls;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.CommandWpf;
@@ -22,15 +23,56 @@ namespace HandyControlDemo.ViewModel
/// </summary>
private object _subContent;
/// <summary>
/// 数据列表
/// </summary>
private List<DemoDataModel> _dataList;
#endregion
public MainViewModel()
{
Messenger.Default.Register<object>(this, MessageToken.LoadShowContent, obj => SubContent = obj);
var list = new List<DemoDataModel>();
for (var i = 1; i <= 6; 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,
DataList = dataList
};
list.Add(model);
}
DataList = list;
}
#region 属性
/// <summary>
/// 数据列表
/// </summary>
public List<DemoDataModel> DataList
{
get => _dataList;
set => Set(ref _dataList, value);
}
/// <summary>
/// 子内容
/// </summary>
@@ -74,6 +116,7 @@ namespace HandyControlDemo.ViewModel
{
if (item.Tag is string tag)
{
if (item.Content.Equals(ContentTitle)) return;
ContentTitle = item.Content;
Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{tag}"), MessageToken.LoadShowContent);
}