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

Run the Apply method for CustomMapping during runtime

1 Answer 54 Views
TreeMap and PivotMap
This is a migrated thread and some comments may be shown as answers.
YBOT
Top achievements
Rank 1
Veteran
YBOT asked on 22 Jan 2020, 03:32 PM

I would like to know how to get my CustomMapping to run the Apply method. I have a list of animals and the speed of the animals should control the colour of the treemapitem. However when the animals speed changes then the treemap tiles don't change colour but on startup the colours visible. They just never change. When the animals size changes the tiles do reflect the changes. How do I run the Apply method?

 

<telerik:RadTreeMap x:Name="treeMap" ItemsSource="{Binding TreeMapList}" LayoutStrategy="Squarified">
        <telerik:RadTreeMap.TypeDefinitions>
            <telerik:TypeDefinition TargetTypeName="TreeMapItem"
                                        ValuePath="AnimalSize"
                                        LabelPath="Animal"
                                        ToolTipPath="ToolTip">
                <telerik:TypeDefinition.Mappings>
                    <local:ValueColourMapping  MinValue="{Binding MinCurrentSpeed}" MaxValue="{Binding MaxCurrentSpeed}" Field="CurrentSpeed" />
                </telerik:TypeDefinition.Mappings>
 
            </telerik:TypeDefinition>
        </telerik:RadTreeMap.TypeDefinitions>
    </telerik:RadTreeMap>

 

1 Answer, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 27 Jan 2020, 12:16 PM

Hello Toby,

Thank you for the provided code snippet. 

May I ask you to check out the following forum thread, where a similar question was discussed: Invoke Apply() in CustomMapping? The forum thread is for the Silverlight version of the RadTreeMap, however the same would apply for the WPF version as well. 

I hope you find this helpful.

Regards,
Vladimir Stoyanov
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.
Tags
TreeMap and PivotMap
Asked by
YBOT
Top achievements
Rank 1
Veteran
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or