Hi, following the selections example in the help, I have the following xmal. How do I tab into the stoke property of the Ellipse control and the To property of ColorAnimation? I would like to change those properties in code behind. I've tried graphic.Symbol.ControlTemplate.SetValue (Ellipse.StrokeProperty, new SolidColorBrush(Colors.Red)); and graphic.Symbol.ControlTemplate.GetValue(Ellipse.StrokeProperty);. In either case, I got an exception.
Thanks,
yin
<Grid.Resources>
<esriSymbols:MarkerSymbol x:Key="SelectMarkerSymbol" >
<esriSymbols:MarkerSymbol.ControlTemplate>
<ControlTemplate>
<Ellipse x:Name="Element" Width="15" Height="15" StrokeThickness="10"
Stroke="Green">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Unselected" />
<VisualState x:Name="Selected">
<Storyboard>
<ColorAnimation Storyboard.TargetName="Element"
Storyboard.TargetProperty="(Ellipse.Stroke).(SolidColorBrush.Color)"
To="Cyan" Duration="00:00:0.25"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Ellipse>
</ControlTemplate>
</esriSymbols:MarkerSymbol.ControlTemplate>
</esriSymbols:MarkerSymbol>
</Grid.Resources