public void LoadModel(SectionModel[] sectionModels) { Items.Clear(); if (sectionModels == null) { return; } foreach (var sectionModel in sectionModels) { var section = new SubSectionEntryViewModel(this); section.LoadModel(sectionModel); Items.Add(section); } }
private void DoMoveSectionDown(SubSectionEntryViewModel section) { var index = Items.IndexOf(section); Items.Move(index, index + 1); }
private bool CanMoveSectionDown(SubSectionEntryViewModel section) { var index = Items.IndexOf(section); return(index < Items.Count - 1); }
private bool CanMoveSectionUp(SubSectionEntryViewModel section) { var index = Items.IndexOf(section); return(index > 0); }
private void DoRemoveSection(SubSectionEntryViewModel section) { Items.Remove(section); }