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

Points Fail to Appear

Aug 4, 2016 at 7:39 PM
Edited Aug 4, 2016 at 8:23 PM
I'm looking at the WPF example and noticed that the points you've added appear in the designer but not at run time. I'm having a similar issue with my application, any idea why this is occurring?

Example XAML in question (MainWindow.xaml in WpfApplication) -
<map:MapItemsControl ItemsSource="{Binding Points}"
                                 ItemContainerStyle="{StaticResource PointItemStyle}"
                                 IsSynchronizedWithCurrentItem="True"
                                 SelectionMode="Extended">
</map:MapItemsControl>
Points is just an ObservableCollection, so as far as I understand it they should be appearing. But the only one that shows up is the last one, which is the animated point.

EDIT: Actually I found the issue with the example -

In MapBase.cs you originally had:
ViewportChanged?.Invoke(this, EventArgs.Empty);
Which did not compile. I had originally just tried commenting it out, but replacing it with this fixed the issue:
if (ViewportChanged != null)
{
    ViewportChanged.Invoke(this, EventArgs.Empty);
}
Coordinator
Aug 5, 2016 at 5:00 AM
?. is the null-conditional operator.

You should probably upgrade to Visual Studio 2015.