PointAnimation
.NET프로그래밍/Silverlight 3.0 2009. 12. 3. 15:51 |[MainPage.xaml]
<UserControl x:Class="RiaPointAnimation.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Canvas Background="White" Width="400" Height="300">
<!--[1] 스토리보드 정의-->
<Canvas.Triggers>
<EventTrigger RoutedEvent="Canvas.Loaded">
<BeginStoryboard>
<Storyboard>
<PointAnimation
Storyboard.TargetName="line"
Storyboard.TargetProperty="EndPoint"
Duration="0.0:0:2.0"
From="100, 100"
To="100, 50"
AutoReverse="True"
RepeatBehavior="2x"
/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Canvas.Triggers>
<!--[2] 대상 요소 정의 : 라인-->
<Path Fill="Black" Stroke="Black">
<Path.Data>
<LineGeometry x:Name="line" StartPoint="50, 50" EndPoint="100, 100" />
</Path.Data>
</Path>
</Canvas>
</UserControl>
'.NET프로그래밍 > Silverlight 3.0' 카테고리의 다른 글
여러개의 타임라인 사용하기 (0) | 2009.12.03 |
---|---|
ColorAnimation (0) | 2009.12.03 |
EventTrigger가 아닌 리소스를 사용 (0) | 2009.12.03 |
<DoubleAnimation /> - 이미지에 Animation 효과 주기(FadeIn) (0) | 2009.12.03 |
애니메이션 (Animation) (0) | 2009.12.03 |