Adding points to map programmatically
Closed this issue · 3 comments
AurasoftEnzo commented
Hello, I'm trying to add new map points programmatically in C#. Here is the code that I suppose should work:
Points.Add(new PointItem { Name = "Enzo", Location = new Location(45.23775883841355, 13.933593105468344) });
var mic = new MapItemsControl();
mic.ItemsSource = Points;
map.Children.Add(mic);
...but it doeasn't, maybe you have idea to work this out?
Thanks.
ClemensFischer commented
Is this the PointItem class from the sample application? It works there, have a closer look, or provide enough of your code so that the problem is reproducible.
ClemensFischer commented
The MapItemsControl is apparently missing an ItemContainerStyle. Take a look at the XAML of the sample application.
AurasoftEnzo commented
Oh yes, thank you, I've figured it out, now it's working =)
Regards