| |
' turn on annotation
pGeoFeatureLayer.DisplayAnnotation = True
Dim pAnnoLayerPropsColl As IAnnotateLayerPropertiesCollection
' get existing annotation properties collection
pAnnoLayerPropsColl = pGeoFeatureLayer.AnnotationProperties
' get the (first) AnnotateLayerProperties property set in the collection
Dim pAnnoLayerProps As IAnnotateLayerProperties
pAnnoLayerPropsColl.QueryItem(0, pAnnoLayerProps, Nothing, Nothing)
' QI to the LabelEngineLayerProperties interface
Dim pLabelEngineLayerProps As ILabelEngineLayerProperties
pLabelEngineLayerProps = CType(pAnnoLayerProps, ILabelEngineLayerProperties)
' get reference to existing text symbol
Dim pTextSymbol As ITextSymbol = pLabelEngineLayerProps.Symbol
' QI to IMask interface of text symbol
Dim pMask As IMask = CType(pTextSymbol, IMask)
' set the mask properties
pMask.MaskSize = 1
pMask.MaskStyle = esriMaskStyle.esriMSHalo
' Note that you could also tweak the text properties here |