HandyControl/HandyControlDemo/ViewModel/ComboBoxDemoViewModel.cs

25 lines
641 B
C#
Raw Normal View History

2018-10-09 00:41:11 +08:00
using System.Collections.Generic;
using GalaSoft.MvvmLight;
using HandyControlDemo.Service;
2018-10-09 00:41:11 +08:00
namespace HandyControlDemo.ViewModel
{
public class ComboBoxDemoViewModel : ViewModelBase
{
/// <summary>
/// 数据列表
/// </summary>
private List<string> _dataList;
/// <summary>
/// 数据列表
/// </summary>
public List<string> DataList
{
get => _dataList;
set => Set(ref _dataList, value);
}
public ComboBoxDemoViewModel(DataService dataService) => DataList = dataService.GetComboBoxDemoDataList();
2018-10-09 00:41:11 +08:00
}
}