Using the UWP MapControl in WPF
In Chapter 9, Enhancing Applications with the Windows Community Toolkit, we explored MapControl
for WPF and WinForms in the WCT sample application. In this section, we are going to add this MapControl
to a WPF project that allows users to set the current position of the interactive map to several points of interest throughout the world. Let's get started:
- Add a WPF Application or WPF App (.NET Framework) project to the solution and name it
XamlIslandsSample.WpfMaps
. - Open NuGet Package Manager and add the Microsoft.Toolkit.Wpf.UI.Controls package to the new project.
- Before we can begin working with maps, we will need a map authentication key from Bing Maps. There is no Azure Maps SDK for Windows at the time of writing. The API key must currently be generated in the Bing Maps portal. Get started at https://www.bingmapsportal.com/. If you don't have a developer account yet, create one. If you already have one, you can sign in now...