Hi,
As you can see in the code below, I create a RadGauge dynamically in the codebehind. The problem is the needles are not animated if I code like in this way. Do I miss something in the code?
Needle ndl = new Needle();
ndl.Foreground = new SolidColorBrush(Colors.Yellow);
ndl.Background = new SolidColorBrush(Colors.Yellow);
RadGauge rg = new RadGauge();
rg.Height = 100;
rg.Width = 100;
ndl.IsAnimated = true;
ndl.Duration = new Duration(TimeSpan.FromSeconds(2));
rsStat.Min = 0;
double d = 0;
if (Double.TryParse(Value, out d))
{
rsStat.Label = new LabelProperties();
rsStat.Label.Location = ScaleObjectLocation.Inside;
rsStat.Label.FontSize = 8;
rsStat.Indicators.Add(ndl);
rsStat.Max = Math.Pow(10, Math.Ceiling(Math.Log10(d)));
ndl.Value = d;
}
As you can see in the code below, I create a RadGauge dynamically in the codebehind. The problem is the needles are not animated if I code like in this way. Do I miss something in the code?
Needle ndl = new Needle();
ndl.Foreground = new SolidColorBrush(Colors.Yellow);
ndl.Background = new SolidColorBrush(Colors.Yellow);
RadGauge rg = new RadGauge();
rg.Height = 100;
rg.Width = 100;
ndl.IsAnimated = true;
ndl.Duration = new Duration(TimeSpan.FromSeconds(2));
rsStat.Min = 0;
double d = 0;
if (Double.TryParse(Value, out d))
{
rsStat.Label = new LabelProperties();
rsStat.Label.Location = ScaleObjectLocation.Inside;
rsStat.Label.FontSize = 8;
rsStat.Indicators.Add(ndl);
rsStat.Max = Math.Pow(10, Math.Ceiling(Math.Log10(d)));
ndl.Value = d;
}