Visually Located


Bind a collection of items to the Windows Phone MapControl

With every major version of Windows Phone comes a new way to work with maps. Keeping up with all of these changes has, honestly, been a hassle. Windows Phone 8.1 continues this trend with the new MapControl. It does improve from Windows Phone 8 in a lot of ways. One of those areas is that you no longer need another toolkit to perform basic map functionality. In Windows Phone 8 you needed the Windows Phone Toolkit to do things like add map elements to the map. Now this functionality is part of the core functionality. To bind a collection of items to the new MapControl you use the MapItemsControl within the MapControl itself. <maps:MapControl x:Name="Map" MapServiceToken="abcdef-abcdefghijklmno"> <maps:MapItemsControl ItemsSource="{Binding Locations}"> </maps:MapItemsControl> </maps:MapControl> The MapItemsControl is just a DependencyObject that has the ability to set items, thr... [More]