This is a migrated thread and some comments may be shown as answers.

Label template bindings not updating

1 Answer 138 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Flemming asked on 24 Jan 2019, 10:26 AM


I have a RadPieChart with a Doughnut series:

   <telerik:RadPieChart x:Name="PieChart">
            <telerik:DoughnutSeries x:Name="PieSeries1" ValueBinding="Value" ItemsSource="{Binding Items}" InnerRadiusFactor="0.4" RadiusFactor="0.8" DefaultSliceStyle="{StaticResource PieSliceStyle}">
                    <telerik:ChartSeriesLabelDefinition Template="{StaticResource LabelTemplate1}"/>

This is the label template:

  <DataTemplate x:Key="LabelTemplate1">
            <TextBlock Foreground="#FFB6B6B6"
                       Text="{Binding Path=DataItem.Label}"
                       Visibility="{Binding Path=DataItem.Visibility}"
                       FontSize="18" FontFamily="Segoe UI" TextAlignment="Center" />

The data objects I bind to in the template implements “INotifyPropertyChanged” and the properties raise the “PropertyChanged” event when changed. This works fine elsewhere.

The labels gets their initial label text/visibility fine. But if I update the values - it is not reflected to the labels.

I bind to the data objects in the “DefaultSliceStyle” too and it works fine when updating.

Any ideas why – and is there an alternative solution?


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 28 Jan 2019, 02:28 PM
Hello Flemming,

Thank you for the provided code snippets.

I have double check this and was able to update the values and labels of the slices. You can find the project which I used to test your scenario. Can you take a look at this project and let me know if I am missing additional code in order to reproduce this behavior?

I am looking forward to your reply.

Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question