블로그 이미지
Magic_kit
study 관련자료를 한곳으로 자기 개발 목적으로 재태크 재무 관리 목적으로 일상생활의 팁을 공유 하기 위하여 블로그를 개설 하였습니다.

calendar

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
반응형

Category

Recent Post

Recent Comment

Archive

2009. 12. 7. 18:22 .Net Project/SilverLight 3.0
반응형
  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> 




반응형
posted by Magic_kit
2009. 12. 7. 17:58 .Net Project/SilverLight 3.0
반응형
  FillBehaviorExample
- 애니메이션이 끝나면 Duration에서 설정한 시간이 되면, 어떻게 할것인지 결정하는 프로퍼티 입니다
- HoldEnd : 애니메이션이 끝나면 다른 요청이 있기 전까지 그 상태를 유지
- Stop : 애니메이션이 끝나면 애니메이션 시작한 값으로 초기화
  FillBehaviorExample.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

                    FillBehavior="Stop"

                    Storyboard.TargetName="rect"

                    Storyboard.TargetProperty="(Canvas.Top)"

                        From="0" To="100"/>

 

                <!-- X 좌표 이동 애니메이션 -->

                <DoubleAnimation

                    FillBehavior="Stop"            

                    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> 




반응형
posted by Magic_kit
2009. 12. 7. 17:52 .Net Project/SilverLight 3.0
반응형
  DurationExample
- 애니메이션 수행 시간 의미
- 값을 입력하지 않으면 디폴트 값인 "00:00:01"이 설정되어 1초 동안 애니메이션 수행 됩니다.
  DurationExample.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

                    Duration="00:00:05"

                    Storyboard.TargetName="rect"

                    Storyboard.TargetProperty="(Canvas.Top)"

                        From="0" To="100"/>

 

                <!-- X 좌표 이동 애니메이션 -->

                <DoubleAnimation

                    Duration="00:00:05"                   

                    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> 




반응형
posted by Magic_kit
2009. 12. 7. 17:48 .Net Project/SilverLight 3.0
반응형
  BeginTimeExample
- 언제 수행될 것인지 결정하기 위하여 사용한다.
- 에니메이션에 BeginTime을 명시하지 않으면 디폴트 값인 "00:00:00" 으로 설정되어 스토리보드가
  수행됨과 동시에 애니메이션 수행

  BeginTimeExample.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

                    Storyboard.TargetName="rect"

                    Storyboard.TargetProperty="(Canvas.Top)"

                        From="0" To="100"/>

 

                <!-- X 좌표 이동 애니메이션 -->

                <DoubleAnimation

                    BeginTime="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>



반응형
posted by Magic_kit