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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user