블로그 이미지
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
반응형

Category

Recent Post

Recent Comment

Archive

2009. 12. 7. 18:41 .Net Project/SilverLight 3.0
반응형
  EasingFunction
- 프로퍼티를 이용하면 애니메이션에 다양한 효과를 부여할 수 있습니다
- 'EasingFunction'은 애니메이션의 수행에 수학적인 연산을 추가해 애니메이션이 역동적으로 표현될
   수 있도록 도와줍니다.
  EasingFunction.Xamls

<UserControl x:Class="BounceEaseTest.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">

    <UserControl.Resources>

        <!-- 떨어지는 애니메이션 -->

        <Storyboard x:Name="MyStoryboard">

            <!-- 5 동안의 를 애니메이션 270으로 변경-->

            <DoubleAnimation

                BeginTime="00:00:00"

                Duration="00:00:05"

                To="270"

                Storyboard.TargetName="ellipse"

                Storyboard.TargetProperty=

                     "(UIElement.RenderTransform).
                      (TransformGroup.Children)[3].(TranslateTransform.Y)">

               

                <DoubleAnimation.EasingFunction>

                   

                    <!-- BounceEase 저기용 -->

                    <BounceEase Bounces="6" EasingMode="EaseIn"/>

                   

                    <!-- EasingMode 'EaseIn' 사용 -->

                    <!--<BounceEase Bounces="6" EasingMode="EaseIn"/>-->

                </DoubleAnimation.EasingFunction>

            </DoubleAnimation>

        </Storyboard>

    </UserControl.Resources>

 

    <Canvas x:Name="LayoutRoot">

        <!-- -->

        <Ellipse x:Name="ellipse"

             Height="100"

             VerticalAlignment="Top"

             Width="100"

             Canvas.Left="150"

             Canvas.Top="30"

             RenderTransformOrigin="0.5,0.5">

 

            <Ellipse.RenderTransform>

                <TransformGroup>

                    <ScaleTransform/>

                    <SkewTransform/>

                    <RotateTransform/>

                    <TranslateTransform/>

                </TransformGroup>

            </Ellipse.RenderTransform>

 

            <Ellipse.Fill>

                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

                    <GradientStop Color="#FF0100FF" Offset="0"/>

                    <GradientStop Color="#FF908FFF" Offset="1"/>

                </LinearGradientBrush>

            </Ellipse.Fill>

        </Ellipse>

    </Canvas>

</UserControl> 




반응형
posted by Magic_kit
2009. 12. 7. 18:34 .Net Project/SilverLight 3.0
반응형
  DoubleAnimation
- TimeLine으로 파생된, DoubleAnimation, PointAnimation, ColorAnimation을 순서대로 살펴 보도록
  할 것입니다. 3개의 동일한 기능의 프로퍼티를 가지고 있습니다.

- 위의 3가지는 모두 동일한 역활을 하고 있으며 From, To, By형 값이 들어가는다는 차이점이 존재
  DoubleAnimation.Xamls

<UserControl x:Class="DoubleAnimationExample.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">

 

                <!-- 넓이 변경 애니메이션 -->

                <DoubleAnimation

                    Duration="00:00:01"

                    Storyboard.TargetName="rect"

                    Storyboard.TargetProperty="(Width)"

                    From="50" To="500" />

               

                <!-- From 생략 애니메이션 -->

                <!--<DoubleAnimation

                    Duration="00:00:01"

                    Storyboard.TargetName="rect"

                    Storyboard.TargetProperty="(Width)"

                    From="100" To="200" />-->

               

                <!-- To 생략 애니메이션 -->

                <!--<DoubleAnimation

                    Duration="00:00:01"

                    Storyboard.TargetName="rect"

                    Storyboard.TargetProperty="(Width)"

                    From="100"/>-->

 

            </Storyboard>

        </Canvas.Resources>

 

        <!-- 사각형 -->

        <Rectangle x:Name="rect" Fill="Red"

                   Width="500" Height="100"

                   Canvas.Left="0" Canvas.Top="0"/>

    </Canvas>

</UserControl> 




반응형
posted by Magic_kit
2009. 12. 7. 18:27 .Net Project/SilverLight 3.0
반응형
  RepeatBehavior
- RepeatBehavior는 애니메이션 반복 횟수를 지정하기 위하여 사용
  RepeatBehavior.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

                    RepeatBehavior="5x"

                    Duration="00:00:01"

                    Storyboard.TargetName="rect"

                    Storyboard.TargetProperty="(Canvas.Top)"

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

 

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

                <DoubleAnimation

                    RepeatBehavior="5x"

                    Duration="00:00:01"

                    Storyboard.TargetName="rect"

                    Storyboard.TargetProperty="(Canvas.Left)"

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

               

                <!-- RepeatBehavior 설정 (속성지정)  -->

                <!--<DoubleAnimation

                    RepeatBehavior="2x"

                    Duration="00:00:01"

                    Storyboard.TargetName="rect"

                    Storyboard.TargetProperty="(Canvas.Top)"

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

 

                <DoubleAnimation

                    RepeatBehavior="2x"

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