ArcObjects Library Reference (Controls)  

IMapControlEvents2.OnExtentUpdated Event

Fires after the extent (visible bounds) of the MapControl is changed.

[Visual Basic .NET]
Public Event OnExtentUpdated As OnExtentUpdatedEventHandler
[C#]
public event OnExtentUpdatedEventHandler OnExtentUpdated
[C++]
HRESULT OnExtentUpdated(
  VARIANT displayTransformation,
  VARIANT_BOOL sizeChanged,
  VARIANT newEnvelope
);
[C++]

Parameters

displayTransformation [in]   displayTransformation is a parameter of type VARIANT sizeChanged [in]   sizeChanged is a parameter of type VARIANT_BOOL newEnvelope [in]   newEnvelope is a parameter of type VARIANT

Product Availability

Available with ArcGIS Engine.

Description

OnExtentUpdated is triggered whenever the IMapControl2::Extent property is changed. Setting the extent explicitly, zooming, panning or using the IMapControl2::CenterAt method will change the extent.

The envelope that gets passed into the newEnvelope event parameter is identical to the envelope returned by the IDisplayTransformation::VisibleBounds property. In the context of the ControlsMapZoomInTool or ControlsMapZoomOutTool commands, this is the extent of the rectangle drawn by the user. When the zoom action is performed, the digitized extent is modified to match the aspect ratio of the display.  Both the IMapControl2::Extent or IDisplayTransformation::FittedBounds properties return the true visible extent of the display.

See Also

IMapControlEvents2 Interface