add HoneycombPanel
This commit is contained in:
1 parent
9856ff1225
commit
9c4fb33c55
29 files changed
+327
-33
No files matched your search
@@ -1,13 +1,34 @@
|
||||
using HandyControlDemo.Data;
|
||||
using System;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
#endif
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.Service;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class CardDemoViewModel : DemoViewModelBase<CardModel>
|
||||
{
|
||||
private readonly DataService _dataService;
|
||||
|
||||
public CardDemoViewModel(DataService dataService)
|
||||
{
|
||||
_dataService = dataService;
|
||||
DataList = dataService.GetCardDataList();
|
||||
}
|
||||
|
||||
public RelayCommand AddItemCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(() => DataList.Insert(0, _dataService.GetCardData()))).Value;
|
||||
|
||||
public RelayCommand RemoveItemCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(() =>
|
||||
{
|
||||
if (DataList.Count > 0)
|
||||
{
|
||||
DataList.RemoveAt(0);
|
||||
}
|
||||
})).Value;
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class MainViewModel : DemoViewModelBase<DemoDataModel>
|
||||
{
|
||||
#region 字段
|
||||
#region 字段
|
||||
|
||||
/// <summary>
|
||||
/// 内容标题
|
||||
@@ -33,7 +33,7 @@ namespace HandyControlDemo.ViewModel
|
||||
/// </summary>
|
||||
private ListBoxItem _listBoxItemCurrent;
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
public MainViewModel(DataService dataService)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ namespace HandyControlDemo.ViewModel
|
||||
DataList = dataService.GetDemoDataList();
|
||||
}
|
||||
|
||||
#region 属性
|
||||
#region 属性
|
||||
|
||||
/// <summary>
|
||||
/// 子内容
|
||||
@@ -84,7 +84,7 @@ namespace HandyControlDemo.ViewModel
|
||||
|
||||
#endregion
|
||||
|
||||
#region 命令
|
||||
#region 命令
|
||||
|
||||
/// <summary>
|
||||
/// 切换例子命令
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace HandyControlDemo.ViewModel
|
||||
|
||||
public NoUserViewModel NoUser => ServiceLocator.Current.GetInstance<NoUserViewModel>();
|
||||
|
||||
public CardDemoViewModel CardDemo => ServiceLocator.Current.GetInstance<CardDemoViewModel>();
|
||||
public CardDemoViewModel CardDemo => new CardDemoViewModel(ServiceLocator.Current.GetInstance<DataService>());
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user