This question is locked. New answers and comments are not allowed.
Hi,
I am trying to reproduce the demo existing on Map Shapes page (in XAML format) to C# code. Mostly wasn't so hard, but now I am stuck on getting the MapPolygon added to the Information Layer.
Here it is the original XAML sample (I supressed the CaptionTemplate part as I don't need it):
And here my C# code:
Thanks!
I am trying to reproduce the demo existing on Map Shapes page (in XAML format) to C# code. Mostly wasn't so hard, but now I am stuck on getting the MapPolygon added to the Information Layer.
Here it is the original XAML sample (I supressed the CaptionTemplate part as I don't need it):
<telerik:RadMap x:Name="radMap" Width="600" Height="480"> <telerik:InformationLayer> <telerik:MapPolygon Points="56,-100 56,-108 48,-108 48,-100" Fill="Green" Stroke="Red" StrokeThickness="4" > </telerik:MapPolygon>
</telerik:InformationLayer></telerik:RadMap>And here my C# code:
InformationLayer MyInformationLayer = new InformationLayer();LocationCollection MyLocationCollection = new LocationCollection();MyLocationCollection.Add(new Location(56, -100));MyLocationCollection.Add(new Location(56, -108));MyLocationCollection.Add(new Location(48, -108));MyLocationCollection.Add(new Location(48, -100));MapPolygon MyMapPolygon = new MapPolygon();MyMapPolygon.Points = MyLocationCollection;MyMapPolygon.Fill = new SolidColorBrush(Colors.Green);MyMapPolygon.Stroke = new SolidColorBrush(Colors.Red);MyMapPolygon.StrokeThickness = 4;// Now -- how to attach MyMapPolygon to MyInformationLayer?Thanks!