arcengine加载模板时实现比例尺与地图的同步

  IGraphicsContainer container = axPageLayoutControl1.PageLayout as IGraphicsContainer;
            IMap map = axPageLayoutControl1.ActiveView.FocusMap;
            container.Reset();
            IElement element = container.Next();
            while (element != null)
            {
                if (element is IMapSurroundFrame)
                {
                    IMapSurroundFrame mapSurroundFrame = element as IMapSurroundFrame;
                    IMapSurround mapSurround = mapSurroundFrame.MapSurround;
                    mapSurround.Map = map;
                }
                element = container.Next();
            }

posted @ 2013-03-07 14:53  忆如梨花  阅读(596)  评论(0编辑  收藏  举报