private bool IsTemplatedSelectedByFilter(string filterText, Template template) { return String.IsNullOrEmpty(_filterText) || template.Code.ToLower().Contains(filterText) || template.Name.ToLower().Contains(filterText); }
private void ExecuteAdd() { Template newTemplate = new Template() { Name = "New Template" }; _originalTemplates.Add(newTemplate); Templates.Add(newTemplate); AssignPropertyChangedHandler(new[] { newTemplate }); SelectedTemplate = newTemplate; MarkAsDirty(); }