<esri:SimpleRenderer x:Key="RouteRenderer"> <esri:SimpleRenderer.Symbol> <esri:LineSymbol> <esri:LineSymbol.ControlTemplate> <ControlTemplate> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"> <Storyboard RepeatBehavior="Forever"> <DoubleAnimation BeginTime="0:0:0" Storyboard.TargetName="Element" Storyboard.TargetProperty="StrokeDashOffset" To="1000" Duration="0:3:0" /> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <!--For polyline and polygon template, a Path element with the name "Element" is required--> <Path x:Name="Element" StrokeDashArray="2,1" StrokeDashOffset="0" Stroke="Green" StrokeThickness="5" /> </Grid> </ControlTemplate> </esri:LineSymbol.ControlTemplate> </esri:LineSymbol> </esri:SimpleRenderer.Symbol> </esri:SimpleRenderer> <!-- =====Unique Value Renderer for Bus Routes.======================================================================= --> <esri:SimpleLineSymbol x:Key="Unknown" Color="Gray" Width="3" Style="Dash" /> <esri:SimpleLineSymbol x:Key="BlackLineSymbol" Color="Black" Width="2" Style="Dash" /> <esri:SimpleLineSymbol x:Key="Route783" Color="Blue" Width="4" Style="Dash" /> <esri:UniqueValueRenderer x:Key="BusRouteUniqueRenderer" Attribute="STREETALL" DefaultSymbol="{StaticResource Unknown}"> <esri:UniqueValueRenderer.Infos> <esri:UniqueValueInfo Value="783" Symbol="{StaticResource Route783}" /> <esri:UniqueValueInfo Value="783_Downtown" Symbol="{StaticResource RouteRenderer}" /> </esri:UniqueValueRenderer.Infos> </esri:UniqueValueRenderer> <!-- =========================================================================================== -->
<esri:SimpleRenderer x:Key="RouteRenderer">
<esri:UniqueValueInfo Value="783_Downtown" Symbol="{StaticResource RouteRenderer}" />
RouteRenderer is defined as a renderer and then is used as a Symbol:
Instead you should define a 'RouteSymbol' (with the line symbol inside your route renderer and then use this symbol in your 'BusRouteUniqueRenderer'
<esri:LineSymbol x:Key="myLineSymbol"> <esri:LineSymbol.ControlTemplate> <ControlTemplate> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"> <Storyboard RepeatBehavior="Forever"> <DoubleAnimation BeginTime="0:0:0" Storyboard.TargetName="Element" Storyboard.TargetProperty="StrokeDashOffset" To="1000" Duration="0:3:0" /> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <!--For polyline and polygon template, a Path element with the name "Element" is required--> <Path x:Name="Element" StrokeDashArray="2,1" StrokeDashOffset="0" Stroke="Green" StrokeThickness="5" /> </Grid> </ControlTemplate> </esri:LineSymbol.ControlTemplate> </esri:LineSymbol>
<esri:UniqueValueRenderer x:Key="BusRouteUniqueRenderer" Attribute="STREETALL" DefaultSymbol="{StaticResource Unknown}">
<esri:UniqueValueRenderer.Infos>
<esri:UniqueValueInfo Value="783" Symbol="{StaticResource Route783}" />
<esri:UniqueValueInfo Value="783_Downtown" Symbol="{StaticResource myLineSymbol}" />
</esri:UniqueValueRenderer.Infos>
</esri:UniqueValueRenderer>
<esri:FeatureLayer ID="MG_BusRoutes" Visible="False"
Url="http://gis.logis.org/arcgis/rest/services/MG_Test/MapServer/9"
Renderer="{StaticResource BusRouteUniqueRenderer }"/>