本文主要是介绍C#+AE 展开/收缩图层的图例,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
/// <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();
}
这篇关于C#+AE 展开/收缩图层的图例的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!