PointAnimation and BezierSegment : Shape Animation « Windows Presentation Foundation « VB.Net 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>
          <PathGeometry>
            <PathFigure>
              <BezierSegment x:Name="bezierSegment1" IsStroked="True" Point1="200,200" Point2="105,205" Point3="280,0" />
            </PathFigure>
          </PathGeometry>

        </GeometryGroup>
      </Path.Data>
      <Path.Triggers>
        <EventTrigger RoutedEvent="Path.Loaded">
          <BeginStoryboard>
            <Storyboard AutoReverse="True" RepeatBehavior="Forever">
              <ParallelTimeline Storyboard.TargetName="bezierSegment1">
                <PointAnimation Storyboard.TargetProperty="Point1" To="30,0" />
                <PointAnimation Storyboard.TargetProperty="Point2" To="0,270" />
                <PointAnimation Storyboard.TargetProperty="Point3" To="30,263" />
              </ParallelTimeline>

            </Storyboard>
          </BeginStoryboard>
        </EventTrigger>
      </Path.Triggers>
    </Path>
  </Grid>
</Window>
WPF Point Animation And Bezier Segment








16.112.Shape Animation
16.112.1.Width and Height animationWidth and Height animation
16.112.2.Scaling parameters ScaleX and ScaleY are animatedScaling parameters ScaleX and ScaleY are animated
16.112.3.Path animation by code, duration, RepeatBehaviorPath animation by code, duration, RepeatBehavior
16.112.4.Point path animationPoint path animation
16.112.5.Animated StartPointAnimated StartPoint
16.112.6.Animated EndPointAnimated EndPoint
16.112.7.Animated StartPoint and EndPointAnimated StartPoint and EndPoint
16.112.8.Animated CenterAnimated Center
16.112.9.Animated RadiusAnimated Radius
16.112.10.Using PointAnimationUsing PointAnimation
16.112.11.PointAnimation and BezierSegmentPointAnimation and BezierSegment
16.112.12.PointAnimation ToPointAnimation To
16.112.13.Animate BezierCurveAnimate BezierCurve