RubberBand zoom


PurposeThis sample demonstrates how to use the Display library's RubberBand object to zoom to the selected area.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Start Visual Studio and open the applicable solution file.
  2. Build the project and start ArcMap.
  3. Click the Customize menu and click Customize Mode.
  4. Click the Commands tab and click Developer Samples.
  5. Click the applicable tool and drag it onto an active toolbar in ArcMap.
  6. Click the tool to enable it.
  7. Click and drag an area to zoom in. Right-click to go back to the previous extent.

RubberBandZoom.cs The C# source code for the RubberBandZoom tool.
Download the C# files
RubberBandZoom.vb The VB .NET source code for the RubberBandZoom tool.
Download the VB.NET files

Download the files for all languages

See Also:

Display library overview




Additional Requirements
  • A map with zoomable data or layout elements.

Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced
Engine Developer Kit Engine