bv,
You can use ValueStyle to do this. Please have a look at the code below.
InMemoryFeatureLayer mapShapeLayer = new InMemoryFeatureLayer();
// Add one column "Style" to the feature source
mapShapeLayer.Open();
mapShapeLayer.Columns.Add(new FeatureSourceColumn("Style"));
mapShapeLayer.Close();
// Create 2 features with the "Style" columns.
Feature feature1 = new Feature(BaseShape.CreateShapeFromWellKnownData("POLYGON((-10 40,40 70,50 0,-10 40))"));
feature1.ColumnValues["Style"] = "Blue";
Feature feature2 = new Feature(new EllipseShape(new PointShape(-70, -20), 10, 20));
feature2.ColumnValues["Style"] = "Yellow";
mapShapeLayer.InternalFeatures.Add("AreaShape1", feature1);
mapShapeLayer.InternalFeatures.Add("AreaShape2", feature2);
// Create a ValueStyle, render differently based on the "Style" Column
ValueStyle valueStyle = new ValueStyle();
valueStyle.ColumnName = "Style";
valueStyle.ValueItems.Add(new ValueItem("Blue", AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Blue)));
valueStyle.ValueItems.Add(new ValueItem("Yellow", AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Yellow)));
mapShapeLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(valueStyle);
mapShapeLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map1.StaticOverlay.Layers.Add(mapShapeLayer);
Also if you are interested, you can create your own MapShape Layer to make it simple, here is how to do it.
gis.thinkgeo.com/Support/Dis...fault.aspx
Thanks,
Ben