-
Notifications
You must be signed in to change notification settings - Fork 500
/
Copy pathPage.xaml
35 lines (32 loc) · 1.41 KB
/
Page.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
31
32
33
34
35
<UserControl x:Class="pointanimation.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="450" Height="400">
<StackPanel>
<TextBlock Margin="10" TextWrapping="Wrap">This sample demonstrates how to use the PointAnimation to animate the Center property of an EllipseGeometry.</TextBlock>
<!-- <SnippetPointanimation> -->
<Canvas Width="450" Height="350">
<Canvas.Resources>
<Storyboard x:Name="myStoryboard">
<!-- Animate the center point of the ellipse from 100 X, 300 Y
to 400 X, 100 Y over 5 seconds. -->
<PointAnimation
Storyboard.TargetProperty="Center"
Storyboard.TargetName="MyAnimatedEllipseGeometry"
Duration="0:0:5"
From="100,300"
To="400,100"
RepeatBehavior="Forever" EnableDependentAnimation="True"/>
</Storyboard>
</Canvas.Resources>
<Path Fill="Blue" Loaded="Start_Animation">
<Path.Data>
<!-- Describes an ellipse. -->
<EllipseGeometry x:Name="MyAnimatedEllipseGeometry"
Center="200,100" RadiusX="15" RadiusY="15" />
</Path.Data>
</Path>
</Canvas>
<!-- </SnippetPointanimation> -->
</StackPanel>
</UserControl>