AnsweredAssumed Answered

FontSize is different then i Have set

Question asked by rakeshmodi1585 on Jan 10, 2017

Lable FontSize is different  then I have set. I set FontSize to 10 but when I check in layer properties -> label -> fontsize is 9.75. 

 

My code is  --

 

IAnnotateLayerPropertiesCollection pAnnoLayerPropsColl = pGeoFeatureLayer.AnnotationProperties;
IElementCollection placedElements = new ElementCollectionClass();
IElementCollection unplacedElements = new ElementCollectionClass();
IAnnotateLayerProperties pAnnoLayerProps;
pAnnoLayerPropsColl.QueryItem(0, out pAnnoLayerProps, out placedElements, out unplacedElements);
pAnnoLayerProps.Class = "LabelSel";
IAnnotationExpressionEngine aAnnoVBScriptEngine = new AnnotationVBScriptEngineClass();

ITextSymbol pTextSymbol = new TextSymbolClass();
stdole.IFontDisp pFont = pTextSymbol.Font;
pFont.Bold = true;
pFont.Size = 10.0m;
pFont.Name = "Arial";
pTextSymbol.Font = pFont;

ILabelEngineLayerProperties pLELayerProps = pAnnoLayerProps as ILabelEngineLayerProperties;
pLELayerProps.ExpressionParser = aAnnoVBScriptEngine;
pLELayerProps.Expression = "["+imagenameField+"]";
pLELayerProps.Symbol = pTextSymbol;

pGeoFeatureLayer.DisplayAnnotation = true;

 

find attached output ...

 

pls help .... 

Attachments

Outcomes