This quick start guides you through the steps of creating a simple WPF application in .NET using the Maps control.
Complete the steps given below to see how the Maps control appears after data binding and setting the properties.
Create a new WPF application.
Install NuGet packages using the 'Manage NuGet Packages' option.
Switch to the code view and add a class named City with the cityName property to get or set city name, and the location property to get or set location of the city.
Add the following code beneath the InitializeComponent() method to create the array collection that will populate the Name property and the LongLat property:
Drag the Maps control on the XAML designer, that is MainWindow.xaml. Place the following XAML markup between the <c1:C1Maps> and </c1:C1Maps> tags:
In the XAML code above, we have created a data template using the VectorPlacemark and VectorLayer classes. The following properties are used in the XAML code: