public class EnumDesp
{
public int Id { get; set; }
public string Name { get; set; }
}
public class MainWindowViewModel : BindableBase
{
private string _title = "Prism Application";
public string Title
{
get { return _title; }
set { SetProperty(ref _title, value); }
}
public ObservableCollection<RealDigitViewModel> Digits { get; set; }=new ObservableCollection<RealDigitViewModel>();
public ObservableCollection<EnumDesp> DigitTypes { get; set; }
public MainWindowViewModel()
{
DigitTypes = DigitTypeConverter.DigitTypes;
this.Digits.Add(new RealDigitViewModel()
{
Name = "Abc",
DigitType = 1
});
this.Digits.Add(new RealDigitViewModel()
{
Name = "Def",
DigitType = 2
});
}
}