public class UnclassedColorsRendererDefinition : RendererDefinition
Public Class UnclassedColorsRendererDefinition Inherits RendererDefinition
public class UnclassedColorsRendererDefinition : RendererDefinition
Public Class UnclassedColorsRendererDefinition Inherits RendererDefinition
Unclassed colors symbology is similar to graduated colors in that it's used to make choropleth maps.
Once you define an unclassed renderer, you can call a FeatureLayer's CreateRenderer and SetRenderer methods to create and assign a renderer to a feature layer.
string colorBrewerSchemesName = "ArcGIS Colors"; StyleProjectItem style = Project.Current.GetItems<StyleProjectItem>().First(s => s.Name == colorBrewerSchemesName); string colorRampName = "Heat Map 4 - Semitransparent"; IList<ColorRampStyleItem> colorRampList = await QueuedTask.Run(() => { return style.SearchColorRamps(colorRampName); }); ColorRampStyleItem colorRamp = colorRampList[0]; await QueuedTask.Run(() => { CIMPointSymbol pointSym = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.GreenRGB, 16.0, SimpleMarkerStyle.Diamond); CIMSymbolReference symbolPointTemplate = pointSym.MakeSymbolReference(); //defining an unclassed renderer with custom upper and lower stops //all features with value >= 5,000,000 will be drawn with the upper color from the color ramp //all features with value <= 50,000 will be drawn with the lower color from the color ramp UnclassedColorsRendererDefinition unclassRndrDef = new UnclassedColorsRendererDefinition ("Population", symbolPointTemplate, colorRamp.ColorRamp, "Highest", "Lowest", 5000000, 50000) { //drawing features with null values with a different symbol ShowNullValues = true, NullValueLabel = "Unknown" }; CIMPointSymbol nullSym = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.RedRGB, 16.0, SimpleMarkerStyle.Circle); unclassRndrDef.NullValueSymbol = nullSym.MakeSymbolReference(); FeatureLayer flyr = MapView.Active.Map.Layers[0] as FeatureLayer; CIMClassBreaksRenderer cbRndr = (CIMClassBreaksRenderer)flyr.CreateRenderer(unclassRndrDef); flyr.SetRenderer(cbRndr); });
System.Object
ArcGIS.Desktop.Mapping.LayerDrawingDefinition
ArcGIS.Desktop.Mapping.RendererDefinition
ArcGIS.Desktop.Mapping.UnclassedColorsRendererDefinition
Target Platforms: Windows 10, Windows 8.1, Windows 7