Skip to main content

How to: Add a Map Control at Design Time

This short introductory example describes how to add a Map control to your WinForms application at design time within Visual Studio.

  1. Run Microsoft Visual Studio.
  2. Create a new Windows Forms Application project by selecting FILE | New | Project… in the main menu. In the New Project window that is invoked, select Windows Forms Application and specify the project name.
  3. Add the MapControl component to your project.

    To do this, locate the MapControl item in the Toolbox under the DX.23.2: Data & Analytics tab and drop it onto the form.

    MapToolbox

  4. Click the Map control’s smart tag to invoke its actions list. In the actions list, click the Dock in Parent Container link. This allows the Map control to occupy all of the available space on the form.

    Lesson1_DockMap

    After docking the Map control, it will appear as follows:

    Lesson1_MapOnWinForm

The MapControl has now been added to your application.