protected void OnDropIndicatorHeightChanged(DependencyPropertyChangedEventArgs e) { VisualStateGroup visualStateGroup = ReorderListBoxItem.GetVisualStateGroup((FrameworkElement)VisualTreeHelper.GetChild((DependencyObject)this, 0), "DropIndicatorStates"); if (visualStateGroup == null) { return; } foreach (VisualState state in (IEnumerable)visualStateGroup.States) { using (IEnumerator <Timeline> enumerator = ((PresentationFrameworkCollection <Timeline>)state.Storyboard.Children).GetEnumerator()) { while (((IEnumerator)enumerator).MoveNext()) { Timeline current = enumerator.Current; // ISSUE: explicit reference operation this.UpdateDropIndicatorAnimationHeight((double)e.NewValue, current); } } } foreach (VisualTransition transition in (IEnumerable)visualStateGroup.Transitions) { using (IEnumerator <Timeline> enumerator = ((PresentationFrameworkCollection <Timeline>)transition.Storyboard.Children).GetEnumerator()) { while (((IEnumerator)enumerator).MoveNext()) { Timeline current = enumerator.Current; // ISSUE: explicit reference operation this.UpdateDropIndicatorAnimationHeight((double)e.NewValue, current); } } } }
protected void OnDropIndicatorHeightChanged(DependencyPropertyChangedEventArgs e) { VisualStateGroup visualStateGroup = ReorderListBoxItem.GetVisualStateGroup((FrameworkElement)VisualTreeHelper.GetChild((DependencyObject)this, 0), "DropIndicatorStates"); if (visualStateGroup == null) { return; } foreach (VisualState state in (IEnumerable)visualStateGroup.States) { foreach (Timeline child in (PresentationFrameworkCollection <Timeline>)state.Storyboard.Children) { this.UpdateDropIndicatorAnimationHeight((double)e.NewValue, child); } } foreach (VisualTransition transition in (IEnumerable)visualStateGroup.Transitions) { foreach (Timeline child in (PresentationFrameworkCollection <Timeline>)transition.Storyboard.Children) { this.UpdateDropIndicatorAnimationHeight((double)e.NewValue, child); } } }