-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSimplePathAnimation.xaml
30 lines (28 loc) · 1.31 KB
/
SimplePathAnimation.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!-- ======================================================
SimplePathAnimation.xaml (c) 2006 by Charles Petzold
====================================================== -->
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Path Fill="Blue">
<Path.Data>
<EllipseGeometry x:Name="elips"
RadiusX="12" RadiusY="12" />
</Path.Data>
<Path.Triggers>
<EventTrigger RoutedEvent="Path.Loaded">
<BeginStoryboard>
<Storyboard TargetName="elips" TargetProperty="Center">
<PointAnimationUsingPath Duration="0:0:2.5"
AutoReverse="True"
RepeatBehavior="Forever">
<PointAnimationUsingPath.PathGeometry>
<PathGeometry
Figures="M 96 288 C 576 0, 0 0, 480 288" />
</PointAnimationUsingPath.PathGeometry>
</PointAnimationUsingPath>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Path.Triggers>
</Path>
</Canvas>