<DoubleAnimationUsingPath
                Storyboard.TargetName="MyRotateTransform"
                Storyboard.TargetProperty="Angle"
                Source="Angle" 
                Duration="0:0:5" 
                RepeatBehavior="Forever" AutoReverse="True" >
                <DoubleAnimationUsingPath.PathGeometry>
                  <PathGeometry Figures="M 10,100 C 35,0 135,0 160,100 180,190 285,200 310,100" />
                </DoubleAnimationUsingPath.PathGeometry>
              </DoubleAnimationUsingPath>我现在知道的只是物体沿着曲线做曲线运动,曲线也是先画好的。不知道该怎么动画绘制曲线。
效果就是要跟人的手指在屏幕上画一条平滑的曲线一样。
求高手指点,给点思路也好啊。xaml的区人气太差了啊。我之前的一个求助帖,麻烦也帮忙看看。
http://bbs.csdn.net/topics/390488814

解决方案 »

  1.   

    http://www.google.com.hk/search?hl=zh-CN&q=blend+wpf+animation+path还有xaml区?csdn真是乱分类啊。
      

  2.   

    我只在这里看帖子:  http://bbs.csdn.net/forums/DotNETcsdn把silvelright、xaml之类的都排除在外了。
      

  3.   

    谢谢回答,不过google上查到的都是路径动画啊……
      

  4.   

    别用路径动画了。
    你可以这样试下。    <Storyboard x:Key="Storyboard1">
    <DoubleAnimation From="0" To="1" Duration="0:0:5" Storyboard.TargetProperty="(Shape.Stroke).(LinearGradientBrush.GradientStops)[0].Offset" Storyboard.TargetName="path"/>
    <DoubleAnimation From="0" To="1" Duration="0:0:5" Storyboard.TargetProperty="(Shape.Stroke).(LinearGradientBrush.GradientStops)[1].Offset" Storyboard.TargetName="path"/>
        </Storyboard>    <Path x:Name="path" Data="M 10,100 C 35,0 135,0 160,100 180,190 285,200 310,100" StrokeThickness="2">
    <Path.Stroke>
    <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
    <GradientStop Color="Black" Offset="0"/>
    <GradientStop Color="Transparent" Offset="0"/>
    </LinearGradientBrush>
    </Path.Stroke>
        </Path>