I have the following in XAML
<Gauges:SfCircularGauge x:Name="RateGauge" Height="200" Width="200" HorizontalAlignment="Right" Grid.Row="0">
<Gauges:SfCircularGauge.MainScale>
<Gauges:CircularScale x:Name="RateGaugeScale" StartValue="0" EndValue="16" Interval="1" LabelStroke="OrangeRed" TickStroke="OrangeRed" EnableSmartLabels="True">
<Gauges:CircularScale.Ranges>
<Gauges:CircularRange StartValue="0" EndValue="5" Stroke="Red"/>
<Gauges:CircularRange StartValue="5" EndValue="8" Stroke="Yellow"/>
<Gauges:CircularRange StartValue="8" EndValue="16" Stroke="Green"/>
</Gauges:CircularScale.Ranges>
<Gauges:CircularScale.Pointers>
<Gauges:CircularPointer x:Name="RateRangePointer" PointerType="RangePointer" RangePointerStroke="OrangeRed" EnableAnimation="True" RangePointerStrokeThickness="10" />
<Gauges:CircularPointer x:Name="RateNeedlePointer" PointerType="NeedlePointer" NeedlePointerStroke="OrangeRed" EnableAnimation="True"/>
</Gauges:CircularScale.Pointers>
</Gauges:CircularScale>
</Gauges:SfCircularGauge.MainScale>
</Gauges:SfCircularGauge>
My Gauge End Value is variable, so I need to ranges to be variable as well. so how do I create the above ranges programmatically
Secondly, I am trying to update my pointers programmatically, I want it to count down from the highest value to 0, but when I try to set the Value for the pointer I get a Null Reference Exception.