Back to Devexpress

How to: Add a Map Control at Runtime

wpf-10969-controls-and-libraries-map-control-examples-general-how-to-add-a-map-control-at-runtime.md

latest1.2 KB
Original Source

How to: Add a Map Control at Runtime

  • Jun 19, 2025
  • 2 minutes to read

This example demonstrates how to add a MapControl to a WPF application and connect the map to the AzureMapDataProvider at runtime.

  1. Run Microsoft Visual Studio.

  2. Create a new WPF Application project or open an existing one.

  3. Open the Solution Explorer , right-click References and choose Add Reference….

  4. Handle the Window’s Loaded event as follows:

  5. Run the project to see the result.

See Also

How to: Add a Map Control at Design Time

How to: Add a Map Control via XAML

How to: Customize Navigation Elements

How to: Add a Mini Map to the Map