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>