现在的位置: 首页 > 综合 > 正文

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

2013年10月02日 ⁄ 综合 ⁄ 共 497字 ⁄ 字号 评论关闭

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

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

            axTOCControl1.Update();
        }

抱歉!评论已关闭.