This document is archived and information here might be outdated.  Recommended version.

Using the roam command (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > Developing with ArcGIS > Building stand-alone applications > Using the Winforms ArcGIS Engine controls > Using the control commands > Using the roam command

Using the roam command

This topic describes using the out-of-the box roam command with the ArcGIS Engine controls.

Roam command

To successfully use the ControlsMapRoamTool on a ToolbarControl buddied to a MapControl or PageLayoutControl, the command requires the IDynamicMap.DynamicMapEnabled property to be set to true. Failure to set the IDynamicMap.DynamicMapEnabled property to true results in the command being disabled.
When the ControlsMapRoamTool is set as the current tool, the end user can seamlessly pan the display of the MapControl or PageLayoutControl in any direction by moving the tool in the direction they want to pan.
The following code example assumes a MapControl, ToolbarControl, and LicenseControl have been embedded into a form:
private void Form1_Load(object sender, System.EventArgs e)
    IDynamicMap dynamicMap=AxMapControl1.Map as IDynamicMap;
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim dynamicMap As IDynamicMap
End Sub
When using the roam tool, the map display can pause while caching the data to be displayed.

See Also:


To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced