ArcMap Add-in能否调出符号选择界面?

ArcMap Add-in能否调出符号选择界面?
已邀请:

刘峥 - ArcGIS多面手

赞同来自:

【解决办法】:
可以通过ISymbolSelector调出符号选择器


protected override void OnClick() 

// 
// TODO: Sample code showing how to access button host 
// 
ArcMap.Application.CurrentTool = null; 
IApplication application = ArcMap.Application; 
IMxDocument mxdoc = application.Document as IMxDocument; 
IFeatureLayer feaLayer = mxdoc.FocusMap.get_Layer(0) as IFeatureLayer; 
ILegendInfo legendInfo = feaLayer as ILegendInfo; 
ILegendGroup legendGrp = legendInfo.get_LegendGroup(0); 

ILegendClass pLegendClass = legendGrp.get_Class(0); 
ISymbol symbol = pLegendClass.Symbol; 
ISymbolSelector symbolSelector = new SymbolSelectorClass(); 
bool bok = false; 
symbolSelector.AddSymbol(symbol); 

bok = symbolSelector.SelectSymbol(0); 
if (bok) 

pLegendClass.Symbol = symbolSelector.GetSymbolAt(0); 

}

要回复问题请先登录注册