Working with the ScaleBar control


In this topic


Using multiple controls

Multiple ScaleBar controls can be added to a page and buddied to a single Map control. This is done to show scales in multiple units, such as miles and kilometers.

Positioning the control

The scale bar's position is determined by its position on the design page. The scale bar can be positioned over the map, for example, in the lower-left corner by setting the Web page to use absolute positioning, then dragging the ScaleBar control over the map.
Do the following to change the page from a flow layout (the default in Visual Studio 2005) to use absolute positioning:
  1. Open Visual Studio.
  2. Click Layout, Position, and Auto-position Options. The Options dialog box appears.
  3. On the Options dialog under the HTML Designer category, click CSS Positioning.
  4. To change the option when dragging and dropping controls, select the "Change positioning to the following for controls added using the Toolbox, paste, or drag and drop" check box.
  5. Select "Absolutely positioned" in the drop-down list.
  6. Click OK. Now you can drag and drop new controls onto the page and move them to a position on the page.

    See the following screen shot showing the Options dialog box:


Changing the positioning options on the Options dialog box affect subsequent pages created in Visual Studio. To remove absolute positioning, change the option on the Options dialog box.