Sie könnten den Punkt Sammlung wie diese animieren:
<Canvas Background="Tan" Width="100" Height="300" Margin="5,0,0,0">
<Path Stroke="RosyBrown" StrokeThickness="4" >
<Path.Data>
<PathGeometry>
<PathGeometry.Figures>
<PathFigure StartPoint="5,50">
<PolyLineSegment x:Name="PLS" ></PolyLineSegment>
</PathFigure>
</PathGeometry.Figures>
</PathGeometry>
</Path.Data>
</Path>
<Canvas.Triggers>
<EventTrigger RoutedEvent="Canvas.Loaded" >
<BeginStoryboard>
<Storyboard x:Name="sbPathUpDown" BeginTime="0:0:0">
<ObjectAnimationUsingKeyFrames x:Name="objAni"
Duration="0:0:2"
AutoReverse="True" RepeatBehavior="Forever"
Storyboard.TargetName="PLS"
Storyboard.TargetProperty="Points" >
<DiscreteObjectKeyFrame Value="10,50 90,50" KeyTime="0:0:0.05"></DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame Value="10,60 90,50" KeyTime="0:0:0.5"></DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame Value="10,70 105,50" KeyTime="0:0:0.9"></DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame Value="10,60 100,40" KeyTime="0:0:1.2"></DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame Value="10,50 100,50" KeyTime="0:0:1.5"></DiscreteObjectKeyFrame>
<DiscreteObjectKeyFrame Value="10,60 90,50" KeyTime="0:0:1.7" ></DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Canvas.Triggers>
</Canvas>
(beseelt einige linepoints - sieht schlecht aus, aber illustriert den Punkt: o)
Und wenn Sie möchten, um die Punkte zu berechnen und bekommen es mehr glätten usw. Sie es oben im Code füllen:
objAni.KeyFrames.Clear();
double offsetx = 10.0; double offsety = 50;
double w = 40; double h = 40;
for (int i = 0; i < 20; i++)
{
var scale = i * 0.1;
var ww = w * scale;
var hh = h * scale;
var pts = new PointCollection();
pts.Add(new Point(offsetx, offsety));
pts.Add(new Point(offsetx + ww, offsety));
pts.Add(new Point(offsetx + ww, offsety + hh));
pts.Add(new Point(offsetx, offsety + hh));
pts.Add(new Point(offsetx, offsety));
objAni.KeyFrames.Add(new DiscreteObjectKeyFrame { Value = pts, KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromSeconds(i/10.0)) });
}
Zeichnet eine Box, die Größe ändert - Sie Punkte, um es hinzuzufügen könnte und erhalten Sie den Effekt mehr oder weniger wollen.
Mit diesem sollte es leicht sein, eine morphartige Veränderung zu Ihrer Figur zu machen. Scale und Rotieren ist einfacher mit Transformationen. –