Hi,
My requirement is to show the text over the map polygon at runtime.
From the xaml we can do this like:
But from the code behind how we can do the same thing.
My requirement is to show the text over the map polygon at runtime.
From the xaml we can do this like:
<
telerik:MapPolygon
Points
=
"56,-100 56,-108 48,-108 48,-100"
Fill
=
"Green"
Stroke
=
"Red"
StrokeThickness
=
"4"
CaptionLocation
=
"52,-104"
>
<
telerik:MapPolygon.CaptionTemplate
>
<
DataTemplate
>
<
Grid
Background
=
"Yellow"
>
<
telerik:MapLayer.HotSpot
=
"0.50.5"
>
<
TextBlock
Text
=
"My Custom Text"
/>
</
Grid
>
</
DataTemplate
>
</
telerik:MapPolygon.CaptionTemplate
>
</
telerik:MapPolygon
>
But from the code behind how we can do the same thing.
MapPolygon CreatePolygon(IEnumerable<
Location
> points, string areaName)
{
var polygon = new MapPolygon();
polygon.Points = this.pins.Points;
polygon.ToolTip = areaName;
// also I want to set the area name over the MapPolygon
return polygon;
}