[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Collapse]Map Control
   [Expand]Getting Started
    Layers
   [Expand]Coordinate Systems
   [Expand]Map Image Data
   [Expand]GIS Data
   [Expand]Vector Data
   [Expand]Visual Elements
   [Expand]End-User Interaction
   [Collapse]Examples
    [Expand]General
    [Collapse]Map Image Data
      How to: Load Image Tiles from Bing Maps
      How to: Connect to Bing Maps Using a Smart Tag
      How to: Connect to Bing Maps via Instant Layout Assistant
      How to: Load Image Tiles from OpenStreetMap
      How to: Load Image Tiles from Another Source
      How to: Customize a Web Request for a Map Web Service
      How to: Cache Image Tiles Locally
      How to: Obtain a Collection of Available Layers in the ResponseCapabilities Event Handler
    [Expand]GIS Data
    [Expand]Vector Data
    [Expand]Printing and Exporting
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Connect to Bing Maps via Instant Layout Assistant

This example shows how to add a Map control to the WPF application and connect the control to the Bing Maps web service using the Instant Layout Assistant.

Note that Instant Layout Assistant also allows you to connect the Map control to the OpenStreetMap web resource and load vector elements of any shape stored in a Shapefile.

Instant Layout Assistant is a window with a list of controls, which allows you to add controls to the application quickly and customize their common settings.

To add a Map control to your WPF application and connect it to Bing Maps do the following.

  • Run MS Visual Studio 2012 or 2013.

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

    The Instant Layout Assistant appears in the center of the designer window.

    If this does not happen, enable the assistant, choosing the DEVEXPRESS | WPF Controls v18.1 | Enable Instant Layout Assistant category in the Visual Studio menu.

  • Click the Map Control item in the Instant Layout Assistant.

  • Then, click Bing Map in the next window of the Instant Layout Assistant.

This generates the following XAML.

If you run the application, and see a window with the following error message: ”The specified Bing Maps key is invalid. To create a developer account, refer to https://www.microsoft.com/en-us/maps/create-a-bing-maps-key”, refer to the following tutorial: How to: Get a Bing Maps Key.

The following image shows the resulting application.

Expanded See Also

Is this topic helpful?​​​​​​​