| Visual Basic (Declaration) | |
|---|---|
Overloads Public Sub Zoom( _ ByVal screenExtent As Rectangle, _ ByVal zoomIn As Boolean _ ) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
| |
| C# | |
|---|---|
public void Zoom( Rectangle screenExtent, bool zoomIn ) | |
Parameters
- screenExtent
- A System.Drawing.Rectangle object, with coordinates in screen pixels.
- zoomIn
- If true, zooms the map in to the extent of the screenExtent rectangle. If false, zooms the map outward so that the current extent fits the screenExtent rectangle.
Allows zooming the map into a specific rectangle, or out to fit a rectangle. The rectangle is defined in pixels of the Map control. When the zoomIn parameter is true, this method has the same effect as setting the Extent property of the Map to the rectangle in map coordinates that is equivalent to the screen rectangle passed in. The smaller the screenExtent passed in, the more the map will zoom in, and the larger the new map scale will be.
If the zoomIn parameter is false, the map zooms out. The current map extent will be fit into the screenExtent passed in, and the overall new extent will extend outward to encompass additional area. The smaller the screenExtent passed in, the more the map will zoom outward and the smaller the scale of the new extent.
Target Platforms:Windows XP Professional, Windows Server 2003 family