This project has moved. For the latest updates, please go here.

How to draw a polyline from codebehind?

Nov 25, 2015 at 6:47 AM
Could You please give a simple example of how to draw a polyline from codebehind through two or three points?

Nov 25, 2015 at 10:16 AM
Edited Nov 25, 2015 at 10:23 AM
Create a Polyline instance, set its Locations property, and add it to the map's Children. Where exactly is the problem? What have you tried?

The sample application shows how polylines are programmatically created in a view model class and visualized in a MapItemsControl in the view. That's the preferred way - MVVM.
Nov 26, 2015 at 6:05 AM
Ok, Thank You for this answer.