你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
朱新颖
赞同来自:
IMap map = axMapControl1.Map; for (int j = 0; j < map.LayerCount; j++) { ILayer layer = axMapControl1.get_Layer(j); ILegendInfo info = layer as ILegendInfo; for (int i = 0; i < info.LegendGroupCount; i++) { ILegendGroup legendGroup = info.get_LegendGroup(i); legendGroup.Visible = false; } } axTOCControl1.Update();
要回复问题请先登录或注册
1 个回复
朱新颖
赞同来自:
可以通过设置ILegendGroup.Visible为false,来进行折叠,可参考下面代码:
要回复问题请先登录或注册