private void ExecuteDeleteCommand(int index) { if (index < 0 || index >= TemlpateList.Count) { return; } TemlpateList.RemoveAt(index); }
private void ExecuteSaveCommand() { if (string.IsNullOrEmpty(Title)) { return; } var item = new TemplateItem(Title, Content, IsHtml); if (_index < 0) { TemlpateList.Add(item); } else { TemlpateList[_index] = item; } _init(); }