SpeedRatio - 애니메이션의 재생 속도를 결정 하기 위하여 사용 |
SpeedRatio.Xamls <UserControl x:Class="AnimationExample.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:DesignWidth="640" d:DesignHeight="480"> <Canvas x:Name="LayoutRoot"> <Canvas.Resources> <!-- 사각형을 이동시키는 좌표 이동 --> <Storyboard x:Name="rectAnimation"> <!-- Y 좌표 이동 애니 메이션 --> <DoubleAnimation SpeedRatio="0.5" Duration="00:00:01" Storyboard.TargetName="rect" Storyboard.TargetProperty="(Canvas.Top)" From="0" To="100"/> <!-- X 좌표 이동 애니메이션 --> <DoubleAnimation SpeedRatio="0.5" Duration="00:00:01" Storyboard.TargetName="rect" Storyboard.TargetProperty="(Canvas.Left)" From="0" To="100"/> </Storyboard> </Canvas.Resources> <!-- 사각형 --> <Rectangle x:Name="rect" Fill="Red" Width="100" Height="100" Canvas.Left="0" Canvas.Top="0"/> </Canvas> </UserControl> |
'.Net Project > SilverLight 3.0' 카테고리의 다른 글
64장 에니메이션 TimeLine (DoubleAnimation) (0) | 2009.12.07 |
---|---|
63장 에니메이션 TimeLine (RepeatBehavior) (0) | 2009.12.07 |
61장 에니메이션 TimeLine (FillBehaviorExample) (0) | 2009.12.07 |
60장 에니메이션 TimeLine (DurationExample) (0) | 2009.12.07 |
59장 에니메이션 TimeLine (BeginTimeExample) (0) | 2009.12.07 |