原文 AE+C# 向axPageLayoutControl1添加图例

  1. //Get the GraphicsContainer
  2. IGraphicsContainer graphicsContainer = axPageLayoutControl1.GraphicsContainer;
  3.  
  4. //Get the MapFrame
  5. IMapFrame mapFrame = (IMapFrame)graphicsContainer.FindFrame(axPageLayoutControl1.ActiveView.FocusMap);
  6. if (mapFrame == null) return;
  7.  
  8. //Create a legend
  9. UID uID = new UIDClass();
  10. uID.Value = "esriCarto.Legend";
  11.  
  12. //Create a MapSurroundFrame from the MapFrame
  13. IMapSurroundFrame mapSurroundFrame = mapFrame.CreateSurroundFrame(uID, null);
  14. if (mapSurroundFrame == null) return;
  15. if (mapSurroundFrame.MapSurround == null) return;
  16. //Set the name
  17. mapSurroundFrame.MapSurround.Name = "Legend";
  18.  
  19. //Envelope for the legend
  20. IEnvelope envelope = new EnvelopeClass();
  21. envelope.PutCoords(, , 3.4, 2.4);
  22.  
  23. //Set the geometry of the MapSurroundFrame
  24. IElement element = (IElement)mapSurroundFrame;
  25. element.Geometry = envelope;
  26.  
  27. //Add the legend to the PageLayout
  28. axPageLayoutControl1.AddElement(element, Type.Missing, Type.Missing, "Legend", );
  29.  
  30. //Refresh the PageLayoutControl
  31. axPageLayoutControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);

AE+C# 向axPageLayoutControl1添加图例的更多相关文章

  1. Matlab中给figure添加图例(legend),标题(title)和颜色(color)

    在Matlab绘图过程中,尤其是需要将多个图绘制在相同的坐标轴中时,通常需要将不同的曲线设置成为不同的颜色.此外,为了直观,还需要给这张图标增添标题和图例.这篇文章展示了在Matlab的绘图窗口(fi ...

  2. 在地图中调用显示FeatureLayer并进行render、popupTemplate、添加图例等相关内容的设置

    ArcGIS Server发布完FeatureLayer后,就可以在自己的代码中调用并在地图上显示出来了. 一.代码框架 调用FeatureLayer,要在require开头引入"esri/ ...

  3. AE中Shapefile文件添加到SDE数据集

    linder_lee 原文 AE中Shapefile文件添加到SDE数据集(c#) 主要完成用C#,通过AE将本地Shapefile文件导入到SDE的指定数据集下面. 首先说下思路: (1) 通过Op ...

  4. simulink中scope图像显示添加图例

    1. 在scope中添加图例 (1)首先打开配置属性(configuration properties),在display下面的show legend前面打钩 这样就允许图例显示出来 (2)对scop ...

  5. Python3 matplotlib.pyplot 中文乱码 多个直线图 添加图例

    #import之后 font = { 'family' : 'SimHei' } matplotlib.rc('font', **font) # -*- coding:utf-8 -*- import ...

  6. 在AE中通过SDE添加图层(转)

    public void AddSDELayer(bool ChkSdeLinkModle)        {            //< span style="color: #00 ...

  7. arcgis engine - 添加图例,指北针.

    esri帮助提供了使用比例尺的方法: Working with map surrounds 主要代码为: public void AddMapSurround(IPageLayout pageLayo ...

  8. 【AE软件】视频添加字幕

    1.导入视频 2.将视频拖入大屏幕 3.在下面点击右键——新建——文本 4.文字属性设置

  9. openLayers 4 canvas图例绘制,canvas循环添加图片,解决图片闪烁问题

    一.问题来源: 接触Openlayers 一段时间了,最近做了一个农业产业系统,项目中涉及到产业图例,最后考虑用canvas来绘制图例图像.当中带图片的图例移动时,图片会实现闪烁留白情况.闪烁是因为绘 ...

随机推荐

  1. mq_open

    NAME mq_open - 打开一个消息队列 (REALTIME) SYNOPSIS #include <mqueue.h> mqd_t mq_open(const char *name ...

  2. 构建高性能web之路------mysql读写分离实战

    http://blog.csdn.net/cutesource/article/details/5710645 http://www.jb51.net/article/38953.htm http:/ ...

  3. 禁用/启用本地连接的dos命令是什么啊?

    运行如下命令:netsh interface show interface 将显示类似下面的画面:Admin State State Type Interface Name ------------- ...

  4. Model的绑定

    ReflectedControllerDescriptor:ControllerDescriptor Controller的 public override ActionDescriptor Find ...

  5. 手机上的频段GSM GPRS分别是什么

    GSM是一种第二代无线通信的网络制式标准,GPRS是GSM应用的一种数据业务(如上网).频段:上行:890-915MHz(中国移动:890-909,中国联通:909-915)下行:935-960MHz ...

  6. Introducing Microsoft Sync Framework: Sync Services for File Systems

    https://msdn.microsoft.com/en-us/sync/bb887623 Introduction to Microsoft Sync Framework File Synchro ...

  7. Spring Transaction + MyBatis SqlSession事务管理机制[marked]

  8. bzoj2119

    题意就是差分后求形如ABA的串的个数,B的长度为M 这是2011国家集训队互测的试题,是道好题,我直接给出出题人的题解吧: 对于这种在线性序列上的组合计数问题,我们很容易想到一个工具:分治!分治算法在 ...

  9. HDU 1838 Chessboard

    dp[i][j]表示以(i,j)为右下角所含棋盘的最大规模, 如果 s[i][j] == s[i-1][j-1] && s[i][j] != s[i-1][j] && ...

  10. Strongly connected 挺简单的tarjan

    题意:给你一个连通图,问你最多加多少条边,还能保证该图不是强连通图. 对整个图求强连通分量,然后对图缩点,记录一下缩点之后每隔点包含的原来的点的个数,找出最少的那个点,然后对这个点建成完全图,对另外的 ...