protected override bool StartDataPointShowingAnimation(DataPoint dataPoint) { StoryboardGroup storyboardGroup = new StoryboardGroup(); if (!this.IsSeriesAnimationEnabled || (IAppearanceProvider)dataPoint == null) { return(false); } double actualOpacity = dataPoint.ActualOpacity; dataPoint.ActualOpacity = 0.0; storyboardGroup.Children.Add(DependencyPropertyAnimationHelper.CreateAnimation(this.ChartArea, "ActualOpacity", (object)0.0, (object)actualOpacity, (Action <object, object>)((value1, value2) => dataPoint.ActualOpacity = (double)value2), dataPoint.Storyboards, this.Series.ActualTransitionDuration, this.Series.ActualTransitionEasingFunction)); storyboardGroup.Completed += (EventHandler)((source, args) => { if (dataPoint.ViewState != DataPointViewState.Showing) { return; } dataPoint.ViewState = DataPointViewState.Normal; }); storyboardGroup.Begin(); return(true); }
protected override bool StartDataPointShowingAnimation(DataPoint dataPoint) { StoryboardGroup storyboardGroup = new StoryboardGroup(); if (!this.IsSeriesAnimationEnabled || (IAppearanceProvider)dataPoint == null) return false; double actualOpacity = dataPoint.ActualOpacity; dataPoint.ActualOpacity = 0.0; storyboardGroup.Children.Add(DependencyPropertyAnimationHelper.CreateAnimation(this.ChartArea, "ActualOpacity", (object)0.0, (object)actualOpacity, (Action<object, object>)((value1, value2) => dataPoint.ActualOpacity = (double)value2), dataPoint.Storyboards, this.Series.ActualTransitionDuration, this.Series.ActualTransitionEasingFunction)); storyboardGroup.Completed += (EventHandler)((source, args) => { if (dataPoint.ViewState != DataPointViewState.Showing) return; dataPoint.ViewState = DataPointViewState.Normal; }); storyboardGroup.Begin(); return true; }