| Visual Basic (Declaration) | |
|---|---|
Public Overridable Property Extent As Envelope | |
| Visual Basic (Usage) | Copy Code |
|---|---|
| |
| C# | |
|---|---|
public virtual Envelope Extent {get; set;} | |
The current extent of the Map may be retrieved or set with this property. There are many other ways of setting the extent as well, such as the Zoom(Rectangle, bool) and CenterAt(System.Drawing.Point) methods.
Be aware that if you set the extent programmatically during a callback, and the Map control does not initiate the callback, then you must pass the Map's CallbackResults back to the page in order for the changed extent to be displayed to the user. For example, if you add a button control to the page and execute it with a callback, and set the Map extent with this callback, then you must pass the Map's CallbackResults via the button back to the page. See Example for directions to a sample.
Target Platforms:Windows XP Professional, Windows Server 2003 family