public override void Filter(IStateMachine stateMachine, IEnumerable <object> markers) { if (!stateMachine.CanExecuteAllTransitions()) { var objects = markers as object[] ?? markers.ToArray(); var comboBoxItemCollection = GetEditorItems(); for (int index = comboBoxItemCollection.Count - 1; index >= 0; index--) { var item = comboBoxItemCollection[index]; var enumerable = markers as object[] ?? objects.ToArray(); if (!enumerable.Contains(item.GetPropertyValue("Value"))) { comboBoxItemCollection.RemoveAt(index); } } } }