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

Coloring Hotspots

1 Answer 134 Views
Map
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bhaskarkiran
Top achievements
Rank 2
Bhaskarkiran asked on 19 Apr 2011, 09:09 AM
Hi ,

I have taken the example from your demos and trying to modify as per my requirement.  in the Example InformationLayer has HotSpots binding to some Element

Based on a specific type of data i want to change the color of the Element from code behind,

Is it possible?

for example: 
below is the XAML code

<telerik:RadMap x:Name="radMap"
               Width="600"
               Height="480">
   <telerik:InformationLayer>
       <Ellipse x:Name="Ellipse"
                   telerik:MapLayer.Location="42.6957539183824, 23.3327663758679"
                   Width="20"
                   Height="20"
                   Stroke="Red"
                   StrokeThickness="3">
           <telerik:MapLayer.HotSpot>
               <telerik:HotSpot />
           </telerik:MapLayer.HotSpot>
       </Ellipse>
   </telerik:InformationLayer>
</telerik:RadMap>

Now i want to Access the  Ellipse from Codebehind to Change its color,  How can I achieve this Please suggest with a working example.

Thanks & Regards,
Bhaskarkiran

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 21 Apr 2011, 08:28 AM
Hello Bhaskarkiran,

Just to be sure that we are using same terms for the same things. In RadMap the HotSpot is not a class which represents something visible over the map. It sets position inside the framework element which should be placed to the item location. So you can't colorize HotSpot.

As for the accessing ellipse from the code behind, since your ellipse has x:Name="Ellipse" attribute set then you can do it as simple as following:

this.Ellipse.Fill = new SolidColorBrush(Colors.Red);


Best wishes,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Map
Asked by
Bhaskarkiran
Top achievements
Rank 2
Answers by
Andrey
Telerik team
Share this question
or