ArcObjects Library Reference (Controls)  

IMapControl2.CenterAt Method

Moves the center of the MapControl to the specified location.

ERROR: Syntax information about IMapControl2.CenterAt may not be in D:\ArcGIS\DotNet\ESRI.ArcGIS.Controls.dll

[C++]
HRESULT CenterAt(
  IPoint* centerPoint
);
[C++]

Parameters

centerPoint [in]

  centerPoint is a parameter of type IPoint

Product Availability

Available with ArcGIS Engine.

Description

The CenterAt method positions the supplied point in the center of the MapControl. The Extent of the MapControl will change, but the scale will remain the same.

[C#]
double dx = 1;
double dy = 1;
IPoint point = new PointClass();
point.PutCoords(dx, dy);        
axMapControl1.CenterAt(point);  
[Visual Basic .NET]
Dim dX As Double, dY As Double
dX = 1
dY = 1
Dim pPoint As IPoint
pPoint = New PointClass
pPoint.PutCoords(dX, dY)
AxMapControl1.CenterAt(pPoint)

See Also

IMapControl2 Interface