锅盔

内实外圆

博客园 首页 新随笔 联系 订阅 管理

        /// <summary>
        /// 展开图层的图例(最后需要执行toc的Update方法)
        /// </summary>
        /// <param name="pLayer"></param>
        /// <param name="bExpand"></param>
        public static 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 = false;
            }          
        }

posted on 2009-03-30 12:37  锅盔  阅读(471)  评论(2)    收藏  举报