This question is locked. New answers and comments are not allowed.
I have created us state map and bind it with slider. States change color based on slider value. Code is working but tooltip values are not changing. Please advise?
<Grid.Resources> <telerik:ExtendedDataConverter x:Key="ExtendedDataConverter" /> <DataTemplate x:Key="CustomToolTipDataTemplate"> <StackPanel Margin="10,5"> <TextBlock FontWeight="Bold" Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='NAME'}" /> <TextBlock Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='UnemployedNo', StringFormat='Unemployment: {0:#,#.0} k.'}" /> </StackPanel> </DataTemplate> </Grid.Resources> <telerik:RadMap Name="radMap1" ZoomLevel="4" Center="37.684297,-95.06924" UseDefaultLayout="False" MouseDragMode="Drag" MouseClickMode="None" MouseDoubleClickMode="None" IsMouseWheelZoomEnabled="True" IsKeyboardNavigationEnabled="False" InitializeCompleted="radMap1_InitializeCompleted"> <telerik:RadMap.Provider> <telerik:EmptyProvider /> </telerik:RadMap.Provider> <telerik:InformationLayer x:Name="StateLayer"> <telerik:InformationLayer.Reader> <telerik:MapShapeReader/> </telerik:InformationLayer.Reader> <telerik:InformationLayer.Colorizer> <telerik:ColorMeasureScale Mode="Count" TickMarkCount="7"> <telerik:ColorMeasureScale.ShapeFillCollection> <telerik:MapShapeFill Fill="#FFF0D9" Stroke="#B1946D" StrokeThickness="1" /> <telerik:MapShapeFill Fill="#FFE4BA" Stroke="#B1946D" StrokeThickness="1" /> <telerik:MapShapeFill Fill="#FFDBA3" Stroke="#B1946D" StrokeThickness="1" /> <telerik:MapShapeFill Fill="#FFD28D" Stroke="#B1946D" StrokeThickness="1" /> <telerik:MapShapeFill Fill="#FFBF5C" Stroke="#B1946D" StrokeThickness="1" /> <telerik:MapShapeFill Fill="#FFAF33" Stroke="#B1946D" StrokeThickness="1" /> <telerik:MapShapeFill Fill="#E2942D" Stroke="#B1946D" StrokeThickness="1" /> </telerik:ColorMeasureScale.ShapeFillCollection> <telerik:ColorMeasureScale.HighlightFillCollection> <telerik:MapShapeFill Fill="#FFEEA6" Stroke="#B1946D" StrokeThickness="1" /> </telerik:ColorMeasureScale.HighlightFillCollection> </telerik:ColorMeasureScale> </telerik:InformationLayer.Colorizer> </telerik:InformationLayer> </telerik:RadMap> <telerik:RadSlider x:Name="dateSlider" TickFrequency="1" TickPlacement="BottomRight" IsSnapToTickEnabled="True" /> </Grid>void dateSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e) { int val = (int)e.NewValue; foreach (var item in StateRecordList) item.BindShapeByDateRank(val); SetStateColorizer(StateRecordList.Select(x=>x.StateShape).Cast<FrameworkElement>().ToList()); }public void BindShapeByDateRank(int dataRank) { var record = MapValues.Where(x => x.DateRank == dataRank).FirstOrDefault(); if (record.DateRank == dataRank) { StateShape.ExtendedData.SetValue(UnemployedNoPropertyName, record.UnemployedNo); } }private void SetStateColorizer(List<FrameworkElement> list) { var colorizer = this.StateLayer.Colorizer as ColorMeasureScale; colorizer.MinValue = MinColorizerValue; colorizer.MaxValue = MaxColorizerValue; colorizer.ExtendedPropertyName = UnemployedNoPropertyName; colorizer.SetColorByExtendedData(list, UnemployedNoPropertyName, true); }