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

//Get the GraphicsContainer
IGraphicsContainer graphicsContainer = axPageLayoutControl1.GraphicsContainer; //Get the MapFrame
IMapFrame mapFrame = (IMapFrame)graphicsContainer.FindFrame(axPageLayoutControl1.ActiveView.FocusMap);
if (mapFrame == null) return; //Create a legend
UID uID = new UIDClass();
uID.Value = "esriCarto.Legend"; //Create a MapSurroundFrame from the MapFrame
IMapSurroundFrame mapSurroundFrame = mapFrame.CreateSurroundFrame(uID, null);
if (mapSurroundFrame == null) return;
if (mapSurroundFrame.MapSurround == null) return;
//Set the name
mapSurroundFrame.MapSurround.Name = "Legend"; //Envelope for the legend
IEnvelope envelope = new EnvelopeClass();
envelope.PutCoords(, , 3.4, 2.4); //Set the geometry of the MapSurroundFrame
IElement element = (IElement)mapSurroundFrame;
element.Geometry = envelope; //Add the legend to the PageLayout
axPageLayoutControl1.AddElement(element, Type.Missing, Type.Missing, "Legend", ); //Refresh the PageLayoutControl
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. 基于Mongodb的轻量级领域驱动框架(序)

    混园子也有些年头了,从各个大牛那儿学了很多东西.技术这东西和中国的料理一样,其中技巧和经验,代代相传(这不是舌尖上的中国广告).转身回头一望,几年来自己也积累了一些东西,五花八门涉猎到各种方向,今日开 ...

  2. python_pycharm介绍1

    1. 常用设置 修改编程风格 File-Setting中,Editor下Colors&Fonts修改即可调整风格. 修改字体大小 pycharm默认字体太小,需调整些,Settings--&g ...

  3. php 写入数据到MySQL以及从MySQL获取数据,页面出现乱码的解决方法

    现象如标题. 解决思路: 1确定数据库charset是否是utf-8 a. charset不是utf-8 1, 更改数据库charset为utf-8 ALTER DATABASE db_name DE ...

  4. 使用StarUML画类图

    1.综述(What) StarUML是一种生成类图和其他类型的UML图表的工具. StarUML(简称SU),是一种创建UML类图,并能够自动生成Java的“stub code” 的工具.SU也可以做 ...

  5. CentOS下下删除大量文件

    首先建立50万个文件 ➜ test for i in $(seq 1 500000);do echo text >>$i.txt;done 1. rm ➜ test time rm -f ...

  6. android 使用静态变量传递数据

    使用静态变量传递数据之通用方式. 测试应用:当前页面点击button传递数据到一个新的页面显示在textview中. 首先在,mainActivity.xml文件中加入一个button按钮 <B ...

  7. Docker —— 用于统一开发和部署的轻量级 Linux 容器【转】

    转自:http://www.oschina.net/translate/docker-lightweight-linux-containers-consistent-development-and-d ...

  8. 如何在ubuntu下安装合适的翻译词典

    http://jingyan.baidu.com/article/9faa7231523dd6473c28cb3f.html

  9. Html 修改placeholder的颜色属性css样式

    项目需求需要修改文本框的placeholder 的文本颜色, 百度下, 备忘,我使用的是这种方法, ::-webkit-input-placeholder { /* WebKit browsers * ...

  10. ural1221. Malevich Strikes Back!

    http://acm.timus.ru/problem.aspx?space=1&num=1221 算是枚举的 题目意思是必须划出这样的 11011 10001 00000 10001 110 ...