原文 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. mysql使用过程中碰到的问题

    start job failed to start mysql ubuntu 原因时我将var整个目录的组权限设置为www-data了, 试了网上的办法都不行(有个妥协方法是重新安装, 但很不好), ...

  2. C#:MapControl基本操作代码整理

    整理了 MapConrol各基本功能的实现代码 using System; using System.Collections.Generic; using System.Linq; using Sys ...

  3. CDC ->> 在某个SQL Server中开启CDC功能

    USE AdventureWorks;GO--开启某个数据库的CDC功能EXEC sys.sp_cdc_enable_db;GO--is_cdc_enabled栏位为1代表开启CDC功能了SELECT ...

  4. wait、waitpid 僵尸进程 孤儿进程

    man wait: NAME wait, waitpid, waitid - wait for process to change state SYNOPSIS #include <sys/ty ...

  5. 《c程序设计语言》读书笔记--统计总的字符数,打印能打印的最多字符

    #include <stdio.h> #define MAXLINE 10 int getline(char line[],int maxline); void copy(char to[ ...

  6. R.id.layout等不能识别:cannot be resolved or is not a field

    Do not modify the R class. The error means there's something syntactically wrong with your XML layou ...

  7. 甲骨文推出MySQL Fabric,简化MySQL的高可用性与可扩展性

    北京,2014年5月28日——为了满足当下对Web及云应用需求,甲骨文宣布推出MySQL Fabric.MySQL Fabric是一款可简化管理MySQL数据库群的整合式系统.该产品通过故障检测和故障 ...

  8. BZOJ 2727 双十字(树状数组)

    题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=2727 题意: 思路:思路来自这里.首先对于每个位置(i,j)用C[i][j]表示该位置同 ...

  9. How do I install uudecode?

    uudecode is in the package sharutils Install it with the package manager or start a terminal and typ ...

  10. cdoj 1334 郭大侠与Rabi-Ribi 贪心+数据结构

    郭大侠与Rabi-Ribi Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Su ...