Rendering with XAML Online

This sample demonstrates the application of unique value and class breaks renderers using XAML.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.RenderersXAML"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
    <Grid x:Name="LayoutRoot" Background="White">

        <Grid.Resources>

            <esri:SimpleRenderer x:Key="MySimpleRenderer">
                <esri:SimpleRenderer.Symbol>
                    <esri:SimpleLineSymbol Color="Blue" Style="Solid" Width="2" />
                </esri:SimpleRenderer.Symbol>
            </esri:SimpleRenderer>

            <esri:SimpleFillSymbol x:Key="MyYellowFillSymbol" Fill="#44FFFF00" BorderBrush="Transparent" BorderThickness="2" />
            <esri:SimpleFillSymbol x:Key="MyRedFillSymbol" Fill="#44FF0000" BorderBrush="Transparent" BorderThickness="2" />
            <esri:UniqueValueRenderer x:Key="MyUniqueValueRenderer" Field="STATE_NAME" >
                <esri:UniqueValueRenderer.Infos>
                    <esri:UniqueValueInfo Value="Arizona" Symbol="{StaticResource MyRedFillSymbol}" />
                    <esri:UniqueValueInfo Value="New Mexico" Symbol="{StaticResource MyYellowFillSymbol}" />
                    <esri:UniqueValueInfo Value="Texas" >
                        <esri:UniqueValueInfo.Symbol>
                            <esri:SimpleFillSymbol Fill="#44FF6600" BorderBrush="Transparent" BorderThickness="2" />
                        </esri:UniqueValueInfo.Symbol>
                    </esri:UniqueValueInfo>
                </esri:UniqueValueRenderer.Infos>
            </esri:UniqueValueRenderer>

            <esri:SimpleMarkerSymbol x:Key="MySmallMarkerSymbol" Color="#FF007700" Size="8" Style="Circle" />
            <esri:SimpleMarkerSymbol x:Key="MyMediumMarkerSymbol" Color="#FF00BB00" Size="12" Style="Circle" />
            <esri:SimpleMarkerSymbol x:Key="MyLargeMarkerSymbol" Color="#FF00FF00" Size="16" Style="Circle" />
            <esri:ClassBreaksRenderer x:Key="MyClassBreaksRenderer" Field="POP1990" >
                <esri:ClassBreaksRenderer.Classes>
                    <esri:ClassBreakInfo MinimumValue="0" MaximumValue="30000" Symbol="{StaticResource MySmallMarkerSymbol}" />
                    <esri:ClassBreakInfo MinimumValue="30000" MaximumValue="300000" Symbol="{StaticResource MyMediumMarkerSymbol}" />
                    <esri:ClassBreakInfo MinimumValue="300000" MaximumValue="5000000" Symbol="{StaticResource MyLargeMarkerSymbol}" />
                </esri:ClassBreaksRenderer.Classes>
            </esri:ClassBreaksRenderer>
        </Grid.Resources>

        <esri:Map x:Name="MyMap" Extent="-15000000,2000000,-7000000,8000000" WrapAround="True">
            <esri:Map.Layers>

                <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" 
                      Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>

                <esri:FeatureLayer ID="MyFeatureLayerUnique"
                    Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" 
                    Where="STATE_NAME in ('New Mexico', 'Arizona', 'Texas')" 
                    Renderer="{StaticResource MyUniqueValueRenderer}" />

                <esri:FeatureLayer ID="MyFeatureLayerSimple"
                    Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/1" 
                    Mode="OnDemand" 
                    Renderer="{StaticResource MySimpleRenderer}" />

                <esri:FeatureLayer ID="MyFeatureLayerClassBreak"
                    Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0" 
                    Where="STATE_NAME in ('New Mexico', 'Arizona', 'Texas')" 
                    Renderer="{StaticResource MyClassBreaksRenderer}"
                    OutFields="POP1990"  />

            </esri:Map.Layers>
        </esri:Map>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014