void AdjustMaxToAvailableMaxItems() { // Check if current max is contained in available max values -> if not select smallest available _max = AvailableMaxItems.FirstOrDefault(item => item.Value.Equals(Max.Value)) ?? AvailableMaxItems.First(); RaisePropertyChanged(() => Max); }
void DetermineMinAndMaxValuesFrom(GenericRangeFilter <T> genericRangeFilter) { _min = AvailableMinItems.FirstOrDefault(item => item.Value.Equals(genericRangeFilter.Range.MinValue)) ?? AvailableMinItems.First(); _max = AvailableMaxItems.FirstOrDefault(item => item.Value.Equals(genericRangeFilter.Range.MaxValue)) ?? AvailableMaxItems.Last(); }