This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IM > IMapControl2 Interface > IMapControl2.CenterAt Method (ArcObjects .NET 10.5 SDK) |
Moves the center of the MapControl to the specified location.
[Visual Basic .NET] Public Sub CenterAt ( _ ByVal centerPoint As IPoint _ )
[C#] public void CenterAt ( IPoint centerPoint );
[C++]
HRESULT CenterAt(
IPoint* centerPoint
);
[C++]
Parameters centerPoint [in]
centerPoint is a parameter of type IPoint
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.
double dx=1; double dy=1; IPoint point=new PointClass(); point.PutCoords(dx, dy); axMapControl1.CenterAt(point);
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)