Files
HandyControl/src/Shared/HandyControlDemo_Shared/ViewModel/Controls/BadgeDemoViewModel.cs
T
2020-04-30 01:22:27 +08:00

25 lines
536 B
C#

using System;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
namespace HandyControlDemo.ViewModel
{
public class BadgeDemoViewModel : ViewModelBase
{
private int _count = 1;
public int Count
{
get => _count;
#if netle40
set => Set(nameof(Count), ref _count, value);
#else
set => Set(ref _count, value);
#endif
}
public RelayCommand CountCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(() => Count++)).Value;
}
}