画一条直线,实现直线流动显示,线段一段流向另一端的控制怎么实现
前台
<esri:SimpleLineSymbol x:Key="RouteRenderer" Style="DashDotDot" >
<esri:LineSymbol.ControlTemplate>
<ControlTemplate>
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard RepeatBehavior="Forever" >
<DoubleAnimation BeginTime="0:0:0" RepeatBehavior="3x" From="50"
AutoReverse="True" Storyboard.TargetName="Element"
Storyboard.TargetProperty="StrokeDashOffset" To="500" Duration="0:3:0" />
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Path x:Name="Element" StrokeDashArray="1,2" StrokeDashOffset="0" Stroke="#990000FF" StrokeThickness="8" />
</Grid>
</ControlTemplate>
</esri:LineSymbol.ControlTemplate>
</esri:SimpleLineSymbol>
后台是Draw画的