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

0
分享 2013-09-12
         /// <summary>
/// 展开/收缩图层的图例(最后需要执行toc的Update方法)
/// </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();
}

文章来源:http://blog.csdn.net/sydbc/article/details/17142129

0 个评论

要回复文章请先登录注册