public UserControl1(Modes mode, Data.Todos todo, Todo_Listview _Listview, Main_Window _Conainter) { InitializeComponent(); this.todo = todo; ChangeMode(mode); FillFields(todo); ListView = _Listview; Container = _Conainter; }
private void FillFields(Data.Todos todo) { description.Text = todo.Description; deadline.Text = todo.ExpiryDate.ToString(); priority.SelectedIndex = todo.Priority; done.IsChecked = todo.Done; switch (todo.Colour) { case "Red": radioRed.IsChecked = true; break; case "Green": radioGreen.IsChecked = true; break; case "Blue": radioBlue.IsChecked = true; break; } }