原文 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. 使用HTML5实现刮刮卡效果

    你玩过刮刮卡么?一不小心可以中奖的那种.今天我给大家分享一个基于HTML5技术实现的刮刮卡效果,在PC上只需按住鼠标,在手机上你只需按住指头,轻轻刮去图层就可以模拟真实的刮奖效果. 我们利用HTML5 ...

  2. PHP-用ThinkPHP和Bootstrap实现用户登录设计

    一.目标 1.用ThinkPHP和Bootstrap实现用户登录设 2.初步界面如下 二.用到的工具及框架 1.ThinkPHP 2.Bootstrap 3.Subline 三.开发环境搭建 1.下载 ...

  3. iOS sqlite3数据库解析

    看来从版本3.3.1基本上已经支持线程句柄的传递功能.具体限制我标记了一下.(6) Is SQLite threadsafe?SQLite is threadsafe. We make this co ...

  4. C++:获取数组长度

    C/C++中如何获取数组的长度?   如何获取数组的长度 2010-12-15 20:49 C/C++中如何获取数组的长度? 收藏     C.C++中没有提供 直接获取数组长度的函数,对于存放字符串 ...

  5. c++ 在客户端的GCC使用

    c++ 在客户端的GCC使用 翻译自: GCC是GNU工具箱的一个功能,GNU还包括如下功能: GNU compiler collection (GCC) GNU make GNU Debugger ...

  6. USACO Section 3.2: Feed Ratios

    直接暴力搜 /* ID: yingzho1 LANG: C++ TASK: ratios */ #include <iostream> #include <fstream> # ...

  7. (三)在js(jquery)中获得文本框焦点和失去焦点的方法

    在js(jquery)中获得文本框焦点和失去焦点的方法   文章介绍两个方法和种是利用javascript onFocus onBlur来判断焦点和失去焦点,加一种是利用jquery $(" ...

  8. R语言记录程序运行的时间

    f <- function(start_time) { start_time <- as.POSIXct(start_time) dt <- difftime(Sys.time(), ...

  9. [HDOJ1043]Eight(康托展开 BFS 打表)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1043 八数码问题,因为固定了位置所以以目标位置开始搜索,把所有情况(相当于一个排列)都记录下来,用康托 ...

  10. c#调用系统资源大集合-3

    public static void 打开控制面板多媒体属性音频() { Process.Start("rundll32.exe", " shell32.dll,Cont ...