Hi,
I'm using the SfCircularGauge control, within a ListView. The source of the ListView is using a Binded property. Everything works fine, however when the Binding Model is updated and the PropertyUpdated event fires, I get an ArgumentOutOfRangeException (stack trace attached).
This is the code I am using:
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell IsEnabled="false">
<Grid RowSpacing="2" Margin="10" ColumnSpacing="20" Padding="10,10,10,0">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<gauge:SfCircularGauge VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" Grid.RowSpan="4" WidthRequest="80" HeightRequest="80" >
<gauge:SfCircularGauge.Headers>
<gauge:Header Text="{Binding TotalRemaining}" Position="0.5, 0.45" ForegroundColor="#0682F6" FontAttributes="Bold" TextSize="13"/>
<gauge:Header Text="REMAINING" Position="0.5, 0.625" ForegroundColor="#0682F6" FontAttributes="Bold" TextSize="6"/>
</gauge:SfCircularGauge.Headers>
<gauge:SfCircularGauge.Scales>
<gauge:Scale SweepAngle="360" ShowTicks="False" ShowRim="False" ShowLabels="False" EndValue="{Binding Total}">
<gauge:Scale.Ranges>
<gauge:Range Offset="1" StartValue="0" EndValue="{Binding Total}" Color="#27ae60"/>
<gauge:Range Offset="1" StartValue="{Binding TotalPrayed}" EndValue="{Binding Total}" Color="#e74c3c"/>
</gauge:Scale.Ranges>
</gauge:Scale>
</gauge:SfCircularGauge.Scales>
</gauge:SfCircularGauge>
<Label Grid.RowSpan="3" Grid.Column="1" Margin="10" FontSize="25" FontAttributes="Bold" Text="{Binding Name}" TextColor="Black" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
Please can you assist - Is it a bug or am I implementing it incorrectly?
Attachment:
Screenshot_20191004_at_20.57.18_be801c8f.zip