new samples

This commit is contained in:
2023-06-27 17:41:22 +09:00
parent 151f3a5606
commit 392c1c61f3
15 changed files with 300 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using MVVMComboBoxSample.Model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MVVMComboBoxSample.ViewModel
{
internal class StudentViewModel
{
public ObservableCollection<Student> Students { get; set; }
public Student SelectedStudent { get; set; }
public StudentViewModel()
{
this.Students = new ObservableCollection<Student>()
{
new Student() { ID = Guid.NewGuid().ToString(), Name = "Joe", Age = 20 },
new Student() { ID = Guid.NewGuid().ToString(), Name = "Jane", Age = 21 },
new Student() { ID = Guid.NewGuid().ToString(), Name = "Rick", Age = 22 },
new Student() { ID = Guid.NewGuid().ToString(), Name = "Paul", Age = 23 },
};
}
}
}