public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(String info)
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(info));
I have used the one ShapeLayer to load the map of the world and furthermore I have added a ColorMapping such that Countries with Selected = 1 show in a different colour.
My map also allows selection. What I wish to do is to colour the countries I have selected with a ColorMapping.
What I have done is that when catching the ShapeSelected event of the map I update the ViewModel such that the selected country will have the Selected value toggled to one. Then to my understanding all I need to do is refresh the data source, and the ColorMapping should color these newly selected countries as I wish.
I have tried to refresh the map, to update the data source, to add another ShapeLayer with this updated data source, and nothing worked.
How can I now refresh the data source of the map at runtime such that I can colour or uncolour the countries I have selected or deselected?
AKAshwin Kumaravel Syncfusion Team May 30, 2017 07:18 AM UTC
Thanks for using Syncfusion products,
We have validated your query and created a sample based on your requirement in which we have coloured the selected shape using colourMapping. Whenever new shape is selected its get updated in the ViewModel and the selected shape is rendered with different colors using EqualColorMapping.