블로그 이미지
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: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