Hi,
I'd like to add some animation to my Gauge chart so that when the chart loads, the needle moves from 0 to the specified value. Can you point me in the right direction? I can't see anything in the samples which do this.
Thanks
here's some code that should get you started:
<igGauge:XamWebRadialGauge x:Name="theGauge" Loaded="theGauge_Loaded" > <igGauge:XamWebRadialGauge.Scales> <igGauge:RadialGaugeScale StartValue="0" EndValue="100"> <igGauge:RadialGaugeScale.Needles> <igGauge:RadialGaugeNeedle Value="0" /> </igGauge:RadialGaugeScale.Needles> </igGauge:RadialGaugeScale> </igGauge:XamWebRadialGauge.Scales> </igGauge:XamWebRadialGauge>
private void theGauge_Loaded(object sender, RoutedEventArgs e) { DoubleAnimation needleAnimation = new DoubleAnimation(); needleAnimation.To = 77.0; needleAnimation.Duration = TimeSpan.FromSeconds(3.0); Storyboard loadedStoryboard = new Storyboard(); loadedStoryboard.Children.Add(needleAnimation); Storyboard.SetTarget(needleAnimation, this.theGauge.Scales[0].Needles[0]); Storyboard.SetTargetProperty(needleAnimation, new PropertyPath(RadialGaugeNeedle.ValueProperty)); loadedStoryboard.Begin(); }