Engine中如何监控IPageLayoutControl中地图范围发生变化的事件?

Engine中如何监控IPageLayoutControl中地图范围发生变化的事件?
已邀请:

朱新颖

赞同来自: geniuszxd

【解决办法】:
可以获取到IPageLayoutControl的FocusMap,转为IActiveView,进而添加ITransformEvents.VisibleBoundsUpdated事件,这样当地图范围发生变化时会触发该事件。 


private void extentUpdateToolStripMenuItem_Click(object sender, EventArgs e) 

IActiveView activeView = axPageLayoutControl1.ActiveView.FocusMap as IActiveView; 
m_transformEvents = activeView.ScreenDisplay.DisplayTransformation as ITransformEvents_Event; 
m_transformEvents.VisibleBoundsUpdated += new ITransformEvents_VisibleBoundsUpdatedEventHandler(extentUpated); 

private void extentUpated(IDisplayTransformation sender, bool sizeChanged) 


}

 

要回复问题请先登录注册