static void InitializeAnimationListBoxEdit(ListBoxEdit listBoxEdit, IEnumerable <AnimationKind> animationKinds, Type defaultAnimationType) { List <AnimationKind> allAnimationKinds = new List <AnimationKind>(); listBoxEdit.ClearValue(ListBoxEdit.SelectedIndexProperty); AnimationKind noneAnimation = GetNoneAnimation(animationKinds); allAnimationKinds.Add(noneAnimation); allAnimationKinds.AddRange(animationKinds); listBoxEdit.ItemsSource = allAnimationKinds; listBoxEdit.SelectedIndex = GetDefaultAnimationIndex(allAnimationKinds, defaultAnimationType); }