You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
914 B
28 lines
914 B
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 },
|
|
};
|
|
}
|
|
}
|
|
}
|
|
|