private void item_PropertyChanged(object sender, PropertyChangedEventArgs e) { RaisePropertyChanged(e.PropertyName); switch (e.PropertyName) { case "LockedRow": if (MainRowList.Count(x => x.LockedRow && x.Iserial == 0) > 0) { // MainRowList.Remove(SelectedMainRow); } break; } }