Hi,I am trying to define a template for line symbols when they get selected. I want the lines to be highlithed and to change color when you hover over them. I have tried the following, but it does not work. I hope it is only a syntax problem which I cannot see!
<esri:SimpleLineSymbol x:Key="ResultsLineSymbol">
<esri:SimpleLineSymbol.ControlTemplate>
<ControlTemplate x:Name="CustomLineTemplate">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
</VisualState>
<VisualState x:Name="MouseOver">
<Storyboard>
<ColorAnimation
BeginTime="0:0:0"
Storyboard.TargetName="SymbolGeom"
Storyboard.TargetProperty="(Line.Fill).(SolidColorBrush.Color)"
To="Yellow"
Duration="0:0:0">
</ColorAnimation>
</Storyboard>
</VisualState>
<VisualState x:Name="Selected">
<Storyboard>
<ColorAnimation
BeginTime="0:0:0"
Storyboard.TargetName="SymbolGeom"
Storyboard.TargetProperty="(Line.Fill).(SolidColorBrush.Color)"
To="Yellow"
Duration="Forever">
</ColorAnimation>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Line x:Name="SymbolGeom" Stroke="Blue" StrokeThickness="3">
<Line.Fill>
<SolidColorBrush x:Name="theColor" Color="Aqua"></SolidColorBrush>
</Line.Fill>
</Line>
</Grid>
</ControlTemplate>
</esri:SimpleLineSymbol.ControlTemplate>
</esri:SimpleLineSymbol>