Unplanned
Last Updated: 04 Nov 2016 14:36 by ADMIN
ADMIN
Peshito
Created on: 24 Jan 2014 11:49
Category: Chart
Type: Bug Report
1
Legend: Legend flickers when the Items property changes (SL only)
When changing the Items of the legend - the legend flickers. The reason for this is that there is RelativeSource binding for the ContentTemplate of the LegendItemControl, and for the binding to work - the legend item control needs to be in the visual tree. And the binding kicks in after the legend item control is added to the visual tree. 

Workaround: 
Create an implicit style targeting the LegendItemControl and use a Setter as suggested below:
<telerik:RadLegend.Resources>
 <Style TargetType="telerik:LegendItemControl">
  <Setter Property="ContentTemplate" Value="{Binding ItemTemplate, RelativeSource={RelativeSource AncestorType=telerik:RadLegend}}" />
0 comments