public virtual bool FilterFindPredicate(object obj) //предикат для фильтра-поиск { bool result = false; if (String.IsNullOrEmpty(this.FilterFindValue)) { return(true); } AppObjectBase appObjectBase = obj as AppObjectBase; if (appObjectBase != null) { string value = StringHelper.RemoveUnnecessaryChars(appObjectBase.NameBase); string search = StringHelper.RemoveUnnecessaryChars(this.FilterFindValue); return(value.ToUpper().Contains(search.ToUpper())); } return(result); }
private void AppObjectBase_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (e.PropertyName == "IsChecked") { AppObjectBase appObjectBase = sender as AppObjectBase; if (appObjectBase != null) { if (appObjectBase.IsChecked == true) { this.SelectedItemsCount++; } else { this.SelectedItemsCount--; } this.isChecked = true; } this.OnPropertyChanged("Items"); } }
public bool FilterOnlyCheckedPredicate(object obj) { AppObjectBase appObjectBase = obj as AppObjectBase; return(appObjectBase?.IsChecked == true); }