C#+AE 展开/收缩图层的图例

来源:互联网 发布:企业域名续费 编辑:程序博客网 时间:2024/04/29 15:41

 /// <summary>
        /// 展开/收缩图层的图例(最后需要执行tocUpdate方法)
        /// </summary>
        /// <paramname="pLayer"></param>
        /// <paramname="bExpand"></param>
        public void ExpandLegend(ILayer pLayer, boolbExpand)
        {
            ILegendInfo pLegendInfo = pLayer asILegendInfo;


            int iLegendGroupCount =pLegendInfo.LegendGroupCount;
            ILegendGroup pLGroup;
            for (int i = 0; i <iLegendGroupCount; i++)
            {
                pLGroup =pLegendInfo.get_LegendGroup(i);
                pLGroup.Visible =bExpand;
            }
           axTOCControl1.Update();
        }

原创粉丝点击