private void MoveConstruct(int fromIndex, int toIndex) { using (UndoTransaction tx = new UndoTransaction(UndoManager)) { ConstructVM fromConstruct = Constructs[fromIndex]; ConstructVM toConstruct = Constructs[toIndex]; if (RenumberQuestionNo && fromConstruct is QuestionConstructVM && toConstruct is QuestionConstructVM) { QuestionNumberVM fromQuestionNumber = new QuestionNumberVM((QuestionConstructVM)fromConstruct); fromQuestionNumber.AfterValue = toConstruct.No; QuestionNumberVM toQuestionNumber = new QuestionNumberVM((QuestionConstructVM)toConstruct); toQuestionNumber.AfterValue = fromConstruct.No; List <QuestionNumberVM> questionNumbers = new List <QuestionNumberVM>(); questionNumbers.Add(fromQuestionNumber); questionNumbers.Add(toQuestionNumber); SequenceUtils.RenumberQuestionNumbers(this, questionNumbers); } Constructs.Move(fromIndex, toIndex); UpdateModel(false); tx.Commit(); } FocusCell(); }