Hi Dennis,
You can use the following code ,
public class MyTextStyle : TextStyle
{
public MyTextStyle()
: base()
{ }
public MyTextStyle(string textColumnName, GeoFont textFont, GeoSolidBrush textSolidBrush)
: base(textColumnName, textFont, textSolidBrush)
{ }
protected override void DrawCore(IEnumerable<Feature> features, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)
{
foreach (var item in features)
{
item.ColumnValues["name"] = "value";
}
base.DrawCore(features, canvas, labelsInThisLayer, labelsInAllLayers);
}
public static TextStyle CreateSimpleTextStyle(string textColumnName, string fontFamilyName, float fontSize, DrawingFontStyles drawingFontStyle, GeoColor fontColor)
{
GeoFont font = new GeoFont(fontFamilyName, fontSize, drawingFontStyle);
GeoSolidBrush txtBrush = new GeoSolidBrush(fontColor);
MyTextStyle result = new MyTextStyle(textColumnName, font, txtBrush);
return result;
}
}
layer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = MyTextStyle.CreateSimpleTextStyle("columnName", "Arial", 10, DrawingFontStyles.Regular, GeoColor.StandardColors.Black);
Hope it helps,
Edgar