
Symbols define all the non-geographic aspects of a Graphic's appearance. This includes a Graphic's color, border width, transparency, and more. The ArcGIS API for Microsoft Silverlight/WPF includes many symbol classes, each of which allows you to specify symbology in a unique way. Each symbol type is also specific to one geometry type (i.e. point, line, or polygon).
Renderers define a sets of Symbols to apply to a Graphics layer. The Symbol applied to each Graphic depends on the Graphic's attributes. The Renderer specifies which attribute values correspond to which Symbol.
The available Symbols and the geometries to which they apply are summarized in the table below:
| Symbol | Geometry | Description |
|---|---|---|
| SimpleMarkerSymbol | Point | Symbolizes points with simple shapes |
| PictureMarkerSymbol | Point | Symbolizes points with images |
| SimpleLineSymbol | Polyline | Symbolizes lines with pre-defined styles |
| CartographicLineSymbol | Polyline | Symbolizes lines with custom styles |
| SimpleFillSymbol | Polygon | Fills polygons with a Silverlight Brush |
| PictureFillSymbol | Polygon | Fills polygons with images |
In many applications, the same Symbol will be used many times. Consider, for instance, an application that uses the Find task to allow users to search for counties. In this situation, it makes sense to apply the same symbology to the task's results every time the task is executed. In such cases, you should define a Symbol in an application's XAML. This is the best place for the Symbol's definition because, in Silverlight and WPF, an application's visual components are supposed to be specified in XAML, while its execution logic should be defined in .NET code. This makes for a neat separation between presentation layer and business logic, which makes applications easier to develop, maintain, and enhance.
All the symbol classes are defined in the ESRI.ArcGIS.Client.Symbols namespace in the ESRI.ArcGIS.Client assembly. So before you can declare a Symbol in XAML, you must map an XML namespace to this CLR namespace. In an application with a Map and a Feature layer, the namespace declaration would appear as follows:
<UserControl x:Class="SilverlightApp.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client">
Declare static symbols in the resources of the root layout element. The code below declares a SimpleFillSymbol with a semi-transparent red fill and a red outline that is two pixels wide. The x:Name attribute defines the name you will use to reference the Symbol either from XAML or in the page's code-behind. The root element is assumed to be a Grid.
<Grid.Resources> <esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" /> </Grid.Resources>
Now that the symbol is declared, it can be applied to a Feature layer by binding to the FeatureSymbol property. This will apply the symbol to all the features in the layer. The application shown here incorporates the XML namespace and Symbol declarations shown above into a simple application with a Map and a Feature layer. The FeatureSymbol specification is set apart with a larger font.
<UserControl x:Class="SilverlightApp.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client" xmlns:sys="clr-namespace:System;assembly=mscorlib"> <Grid x:Name="LayoutRoot" Background="White"> <Grid.Resources> <esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" /> </Grid.Resources> <esri:Map x:Name="MyMap" Extent="-120, 20, -100, 40" > <esri:Map.Layers> <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" /> <esri:FeatureLayer ID="MyFeatureLayer" Where="1 = 1" FeatureSymbol="{StaticResource MyRedFillSymbol}" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" > <esri:FeatureLayer.OutFields> <sys:String>POP07_SQMI</sys:String> </esri:FeatureLayer.OutFields> </esri:FeatureLayer> </esri:Map.Layers> </esri:Map> </Grid> </UserControl>
Alternatively, when a dynamically generated symbol is required, you can create and apply the Symbol to Graphics individually in the page's code behind. The code here initializes a fill symbol with the fill color based on variables for the color's alpha, red, green, and blue values. The symbol is then applied to each Graphic in Graphics layer.
[C#]
SimpleFillSymbol fillSymbol = new SimpleFillSymbol()
{
BorderBrush = new SolidColorBrush(Color.FromArgb(0, 255, 0, 0)),
BorderThickness = 2,
Fill = new SolidColorBrush(Color.FromArgb(alphaVal, redVal, greenVal, blueVal))
};
GraphicsLayer graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
foreach (Graphic graphic in graphicsLayer.Graphics)
graphic.Symbol = fillSymbol;With the Unique Value Renderer, you can define Symbols for Graphics with particular attribute values. The steps for defining a simple Unique Value Renderer are describe below. To begin with, create an application with a Map, base layer, and Feature layer. Set the Feature layer to use the states layer of the ESRI_Census_USA map service:
[XAML]
<UserControl x:Class="SilverlightApp.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Grid x:Name="LayoutRoot" Background="White" >
<Grid.Resources>
<esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:UniqueValueRenderer x:Name="MyUniqueValueRenderer" Attribute="STATE_NAME" >
<esri:UniqueValueRenderer.Infos>
<esri:UniqueValueInfo Value="California" Symbol="{StaticResource MyGreenFillSymbol}" />
<esri:UniqueValueInfo Value="New York" Symbol="{StaticResource MyYellowFillSymbol}" />
<esri:UniqueValueInfo Value="Kansas" Symbol="{StaticResource MyRedFillSymbol}" />
</esri:UniqueValueRenderer.Infos>
</esri:UniqueValueRenderer>
</Grid.Resources>
<esri:Map x:Name="MyMap" Extent="-130,10,-70,60" >
<esri:Map.Layers>
<esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer"
Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
<esri:FeatureLayer ID="MyFeatureLayer"
Where="(STATE_NAME = 'California') OR (STATE_NAME = 'New York') OR (STATE_NAME = 'Kansas')"
Renderer="{StaticResource MyUniqueValueRenderer}"
Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" >
<esri:FeatureLayer.OutFields>
<sys:String>STATE_NAME</sys:String>
</esri:FeatureLayer.OutFields>
</esri:FeatureLayer>
</esri:Map.Layers>
</esri:Map>
</Grid>
</UserControl>
In the Feature layer, specify a filter so that only California, New York, and Kansas are drawn. Also specify that the STATE_NAME field be included with the layer's graphics.
<esri:FeatureLayer ID="MyFeatureLayer" Where="(STATE_NAME = 'California') OR (STATE_NAME = 'New York') OR (STATE_NAME = 'Kansas')" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" > <esri:FeatureLayer.OutFields> <sys:String>STATE_NAME</sys:String> </esri:FeatureLayer.OutFields> </esri:FeatureLayer>
Declare three fill symbols as static resources:
<Grid.Resources> <esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" /> <esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" /> <esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" /> </Grid.Resources>
Declare a Unique Value Renderer as a resource:
<Grid.Resources>
<esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:UniqueValueRenderer x:Name="MyUniqueValueRenderer" >
</esri:UniqueValueRenderer>
</Grid.Resources>We want to use the renderer to symbolize state Graphics based on the state's names. So within the renderer element, specify the Attribute property as STATE_NAME - the name of the field holding the state name:
<Grid.Resources>
<esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:UniqueValueRenderer x:Name="MyUniqueValueRenderer" Attribute="STATE_NAME" >
</esri:UniqueValueRenderer>
</Grid.Resources>The symbol-value mappings for Unique Value Renderers are specified in a collection of UniqueValueInfo objects that are stored in the Unique Value Renderer's Infos property. Inside the Unique Value Renderer element, specify another element to hold this collection:
<Grid.Resources>
<esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:UniqueValueRenderer x:Name="MyUniqueValueRenderer" Attribute="STATE_NAME" >
<esri:UniqueValueRenderer.Infos>
</esri:UniqueValueRenderer.Infos>
</esri:UniqueValueRenderer>
</Grid.Resources>Specify a UniqueValueInfo element inside the collection:
<Grid.Resources>
<esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:UniqueValueRenderer x:Name="MyUniqueValueRenderer" Attribute="STATE_NAME" >
<esri:UniqueValueRenderer.Infos>
<esri:UniqueValueInfo />
</esri:UniqueValueRenderer.Infos>
</esri:UniqueValueRenderer>
</Grid.Resources>Map California to the green fill symbol by specifying the element's value as "California" and its Symbol as the desired fill symbol:
<Grid.Resources>
<esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:UniqueValueRenderer x:Name="MyUniqueValueRenderer" Attribute="STATE_NAME" >
<esri:UniqueValueRenderer.Infos>
<esri:UniqueValueInfo Value="California" Symbol="{StaticResource MyGreenFillSymbol}" />
</esri:UniqueValueRenderer.Infos>
</esri:UniqueValueRenderer>
</Grid.Resources>Add UniqueValueInfos to symbolize New York with the yellow fill symbol and Kansas with the red fill symbol:
<Grid.Resources>
<esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:UniqueValueRenderer x:Name="MyUniqueValueRenderer" Attribute="STATE_NAME" >
<esri:UniqueValueRenderer.Infos>
<esri:UniqueValueInfo Value="California" Symbol="{StaticResource MyGreenFillSymbol}" />
<esri:UniqueValueInfo Value="New York" Symbol="{StaticResource MyYellowFillSymbol}" />
<esri:UniqueValueInfo Value="Kansas" Symbol="{StaticResource MyRedFillSymbol}" />
</esri:UniqueValueRenderer.Infos>
</esri:UniqueValueRenderer>
</Grid.Resources>Now the renderer needs to be associated with the Feature layer. Along with all the other elements we've specified in our application, this will appear as shown below. The renderer specification is set apart with a larger font.
<UserControl x:Class="SilverlightApp.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client" xmlns:sys="clr-namespace:System;assembly=mscorlib"> <Grid x:Name="LayoutRoot" Background="White" > <Grid.Resources> <esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" /> <esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" /> <esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" /> <esri:UniqueValueRenderer x:Name="MyUniqueValueRenderer" Attribute="STATE_NAME" > <esri:UniqueValueRenderer.Infos> <esri:UniqueValueInfo Value="California" Symbol="{StaticResource MyGreenFillSymbol}" /> <esri:UniqueValueInfo Value="New York" Symbol="{StaticResource MyYellowFillSymbol}" /> <esri:UniqueValueInfo Value="Kansas" Symbol="{StaticResource MyRedFillSymbol}" /> </esri:UniqueValueRenderer.Infos> </esri:UniqueValueRenderer> </Grid.Resources> <esri:Map x:Name="MyMap" Extent="-130,10,-70,60" > <esri:Map.Layers> <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/> <esri:FeatureLayer ID="MyFeatureLayer" Where="(STATE_NAME = 'California') OR (STATE_NAME = 'New York') OR (STATE_NAME = 'Kansas')" Renderer="{StaticResource MyUniqueValueRenderer}" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" > <esri:FeatureLayer.OutFields> <sys:String>STATE_NAME</sys:String> </esri:FeatureLayer.OutFields> </esri:FeatureLayer> </esri:Map.Layers> </esri:Map> </Grid> </UserControl>
The Class Break Renderer allows you to apply symbols to groups of Graphics that have attribute values within specified ranges. The steps to define such a renderer are described below. You should start with the same application that you at the start of the Unique Value Renderer definition. In this case, you will symbolize all the states based on their population density. So define a filter on the Feature layer so that all states are displayed and the POP07_SQMI field is returned:
<esri:FeatureLayer ID="MyFeatureLayer" Where="1 = 1" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" > <esri:FeatureLayer.OutFields> <sys:String>POP07_SQMI</sys:String> </esri:FeatureLayer.OutFields> </esri:FeatureLayer>
Use the same symbols as you did for the Unique Value Renderer:
<Grid.Resources> <esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" /> <esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" /> <esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" /> </Grid.Resources>
Declare a Class Break Render. Specify that the renderer apply symbols based on populate density by setting the Attribute property to POP07_SQMI. This is the population density field in the map service layer used by the application's Feature layer:
<Grid.Resources>
<esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:ClassBreakRenderer x:Name="MyClassBreakRenderer" Attribute="POP07_SQMI" >
</esri:ClassBreakRenderer>
</Grid.Resources>The mapping between symbols and values is defined in a collection of ClassBreakInfo objects. The renderer stores this in its Classes property. Declare an element to hold this collection inside the Class Break Renderer element.
<Grid.Resources>
<esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:ClassBreakRenderer x:Name="MyClassBreakRenderer" Attribute="POP07_SQMI" >
<esri:ClassBreakRenderer.Classes>
</esri:ClassBreakRenderer.Classes>
</esri:ClassBreakRenderer>
</Grid.Resources>In the Classes collection, declare a ClassBreakInfo element to specify a mapping between a Symbol and a range of values. Define the relationship so that values between 0 and 50 will be symbolized with the green fill symbol:
<Grid.Resources>
<esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:ClassBreakRenderer x:Name="MyClassBreakRenderer" Attribute="POP07_SQMI" >
<esri:ClassBreakRenderer.Classes>
<esri:ClassBreakInfo MinimumValue="0" MaximumValue="50" Symbol="{StaticResource MyGreenFillSymbol}" />
</esri:ClassBreakRenderer.Classes>
</esri:ClassBreakRenderer>
</Grid.Resources>Now map value ranges of 51 to 125 and 126 to 2000 to the yellow and red fill symbols:
<Grid.Resources>
<esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" />
<esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
<esri:ClassBreakRenderer x:Name="MyClassBreakRenderer" Attribute="POP07_SQMI" >
<esri:ClassBreakRenderer.Classes>
<esri:ClassBreakInfo MinimumValue="0" MaximumValue="50" Symbol="{StaticResource MyGreenFillSymbol}" />
<esri:ClassBreakInfo MinimumValue="51" MaximumValue="125" Symbol="{StaticResource MyYellowFillSymbol}" />
<esri:ClassBreakInfo MinimumValue="126" MaximumValue="2000" Symbol="{StaticResource MyRedFillSymbol}" />
</esri:ClassBreakRenderer.Classes>
</esri:ClassBreakRenderer>
</Grid.Resources>The last step is to associate the renderer with the Feature layer. The code for entire application should now look as shown below. The code to map the renderer to the Feature layer is shown in a larger font.
<UserControl x:Class="SilverlightApp.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client" xmlns:sys="clr-namespace:System;assembly=mscorlib"> <Grid x:Name="LayoutRoot" Background="White" > <Grid.Resources> <esriSymbols:SimpleFillSymbol x:Name="MyGreenFillSymbol" Fill="#6600FF00" BorderBrush="Green" BorderThickness="2" /> <esriSymbols:SimpleFillSymbol x:Name="MyYellowFillSymbol" Fill="#66FFFF00" BorderBrush="Yellow" BorderThickness="2" /> <esriSymbols:SimpleFillSymbol x:Name="MyRedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" /> <esri:ClassBreakRenderer x:Name="MyClassBreakRenderer" Attribute="POP07_SQMI" > <esri:ClassBreakRenderer.Classes> <esri:ClassBreakInfo MinimumValue="0" MaximumValue="50" Symbol="{StaticResource MyGreenFillSymbol}" /> <esri:ClassBreakInfo MinimumValue="51" MaximumValue="125" Symbol="{StaticResource MyYellowFillSymbol}" /> <esri:ClassBreakInfo MinimumValue="125" MaximumValue="2000" Symbol="{StaticResource MyRedFillSymbol}" /> </esri:ClassBreakRenderer.Classes> </esri:ClassBreakRenderer> </Grid.Resources> <esri:Map x:Name="MyMap" Extent="-130,10,-70,60" > <esri:Map.Layers> <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/> <esri:FeatureLayer ID="MyFeatureLayer" Where="1 = 1" Renderer="{StaticResource MyClassBreakRenderer}" Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" > <esri:FeatureLayer.OutFields> <sys:String>POP07_SQMI</sys:String> </esri:FeatureLayer.OutFields> </esri:FeatureLayer> </esri:Map.Layers> </esri:Map> </Grid> </UserControl>