官方客服给出的解决方案:
在centerat后加一个IScreenDisplay.UpdateWindow()即可,
如: IFeatureLayer feaLayer = axMapControl1.get_Layer(0) as IFeatureLayer;
IPoint pt = (feaLayer.FeatureClass.GetFeature(0)).Shape as IPoint;
IActiveView actView = axMapControl1.ActiveView;
IEnvelope envelpe = actView.Extent;
envelpe.CenterAt(pt);
actView.Extent = envelpe;
actView.Refresh(); //加入强制刷新,保证刷完后再执行其他语句
actView.ScreenDisplay.UpdateWindow();
IRgbColor rgbColor = new RgbColorClass();
rgbColor.RGB = 255;
FlashGeometry(pt, rgbColor, actView.ScreenDisplay, 500);
自己的示例代码:
m_pMapManager.
ZoomToScaleByCenter(60000,
pFeature.
Shape
as
IPoint);
activeView.
PartialRefresh(
esriViewDrawPhase.
esriViewGeography,
null,
null);
//刷新视图
activeView.
ScreenDisplay.
UpdateWindow();
m_pMapManager.
MapCtrl.
FlashShape(
pFeature.
Shape, 2, 500,
null);