Animate StartPoint : Shape Animation « Windows Presentation Foundation « C# / CSharp Tutorial






<Window x:Class="Main"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="" Height="300" Width="300">
  <Grid>
    <Path Stroke="Black" StrokeThickness="1">
      <Path.Data>
        <GeometryGroup>
          <LineGeometry x:Name="line2" StartPoint="38,40" EndPoint="248,40" />
        </GeometryGroup>
      </Path.Data>
      <Path.Triggers>
        <EventTrigger RoutedEvent="Path.Loaded">
          <BeginStoryboard>
            <Storyboard AutoReverse="True" RepeatBehavior="Forever">
              <PointAnimation To="280,40" Storyboard.TargetName="line2" Storyboard.TargetProperty="StartPoint" />
            </Storyboard>
          </BeginStoryboard>
        </EventTrigger>
      </Path.Triggers>
    </Path>
  </Grid>
</Window>
WPF Animate Start Point








24.114.Shape Animation
24.114.1.Animate EndPointAnimate EndPoint
24.114.2.Animate StartPointAnimate StartPoint
24.114.3.Animate Ellipse RadiusY, RadiusXAnimate Ellipse RadiusY, RadiusX
24.114.4.Animate Width and Height of a EllipseAnimate Width and Height of a Ellipse
24.114.5.Animate Width and Height of a RectangleAnimate Width and Height of a Rectangle
24.114.6.Width and Height animationWidth and Height animation
24.114.7.An animated Ellipse traces the outline of rendered text by using the path geometry of the text.An animated Ellipse traces the outline of rendered text by using the path geometry of the text.
24.114.8.Animate Fill.RadiusYAnimate Fill.RadiusY