I would like to change the font size for the annotations on an IGeoFeatureLayer. I tried to set it in the lpLabelEngine.Symbol.Font.Size below but the set doesn't persist.
IGeoFeatureLayer geoLayer = thisLayer as IGeoFeatureLayer;
if (geoLayer != null)
{
geoLayer.DisplayAnnotation = annotationsOn;
IAnnotateLayerPropertiesCollection propertiesColl = geoLayer.AnnotationProperties;
IAnnotateLayerProperties labelEngineProperties = new LabelEngineLayerProperties() as IAnnotateLayerProperties;
IElementCollection placedElements = new ElementCollectionClass();
IElementCollection unplacedElements = new ElementCollectionClass();
propertiesColl.QueryItem(0, out labelEngineProperties, out placedElements, out unplacedElements);
ILabelEngineLayerProperties lpLabelEngine = labelEngineProperties as ILabelEngineLayerProperties;
if(geocode != null) lpLabelEngine.Expression = geocode;
if(annotationLabelColor != null) lpLabelEngine.Symbol.Color = annotationLabelColor;
labelEngineProperties.AnnotationMinimumScale = minScale;
labelEngineProperties.AnnotationMaximumScale = maxScale;
if (fontsize != null) lpLabelEngine.Symbol.Font.Size = Convert.ToDecimal(fontsize);
Any ideas?
ArcEngine 10, C#, VS2010