Select to view content in your preferred language

Selected polygon animated border - custom symbol

739
2
03-01-2011 07:56 AM
IgressT
Emerging Contributor
Hi,
I am trying to create a custom symbol for polygon where the border of the polygon will be similar to the animated line symbol in this example
[HTML]http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomSymbols[/HTML]

I am unsuccessful till now. Did anyone has already done this or can someone give me a clue on how to do this?
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
I am trying to create a custom symbol for polygon where the border of the polygon will be similar to the animated line symbol in this example


Looks working just by replacing LineSymbol by FillSymbol:
<esri:Graphic.Symbol>
<esri:FillSymbol>
<esri:FillSymbol.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:FillSymbol.ControlTemplate>
</esri:FillSymbol>
</esri:Graphic.Symbol>

0 Kudos
IgressT
Emerging Contributor
thanks it works.
0 Kudos