添加引用ESRI.ArcGIS.Carto
1.获取图层

1 IGeoFeatureLayer pFtrLayer = m_pLayer as IGeoFeatureLayer;
2.初始化标注属性集合

1 IAnnotateLayerPropertiesCollection pAnnoProps = pFtrLayer.AnnotationProperties; 2 pAnnoProps.Clear();
3.选择要标注的属性字段

1 ILabelEngineLayerProperties item = new LabelEngineLayerPropertiesClass(); 2 item.Expression = "[要显示属性的字段名]"; 3 item.Symbol = this.btnFont.Tag as ITextSymbol;//可不定义项 4 5 IAnnotateLayerProperties pAnnoLayerProps = item as IAnnotateLayerProperties; 6 pFtrLayer.DisplayAnnotation = this.checkBox1.Checked;//是否显示标注 7 pAnnoLayerProps.AnnotationMaximumScale = 0;//可不定义项 8 pAnnoLayerProps.AnnotationMinimumScale = 0;//可不定义项 9
4.在标注属性集合中添加此字段实现标注属性

1 pAnnoProps.Add(pAnnoLayerProps);//可以标注多个属性字段