public MainVM() { ClassClassrooms = XMLRead.ReadClassroom(Path.ClassroomXml).ToArray(); ClassGroups = XMLRead.ReadGroup(Path.GroupXml).ToArray(); ClassTeachers = XMLRead.ReadTeacher(Path.TeacherXml).ToArray(); ClassSubjects = XMLRead.ReadSubject(Path.SubjectXml).ToArray(); ClassDepartments = XMLRead.ReadDepartment(Path.DepartmentXml).ToArray(); Data = new ObservableCollection <ObservableCollection <DropItem> >(); for (int i = 0; i < maxpair; i++) { Data.Add(new ObservableCollection <DropItem>()); } openCommand = this.Factory.CommandSync(Open); saveToExcel = this.Factory.CommandSync(ExportToExcel); selectCommand = this.Factory.CommandSyncParam <int>(Transform); closeWinCommand = this.Factory.CommandSync(Close); clearCommand = this.Factory.CommandSync(Clear); index = this.Factory.Backing <RowColumnIndex?>(nameof(Index), null); departmentIndex = this.Factory.Backing <int>(nameof(DepartmentIndex), 0); Columns = new ObservableCollection <string>(); Rows = new ObservableCollection <PairInfo>(); Init(); }