private void sizefilter_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (this.sizequery2 != null) { ConditionalSelectComboBoxItem i = (ConditionalSelectComboBoxItem)e.AddedItems[0]; this.sizequery2.IsEnabled = i.IdentifyingName == "Between"; this.sizebox2.IsEnabled = i.IdentifyingName == "Between"; } }