■ 펄스 애니메이션 만들기

----------------------------------------------------------------------------------------------------

<Window

    x:Class="TestProject.MainWindow"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    Width="600"

    Height="450"

    Title="펄스 애니메이션 만들기">

    <Ellipse

        HorizontalAlignment="Center"

        VerticalAlignment="Center"

        Width="48"

        Height="{Binding RelativeSource={RelativeSource self}, Path=Width}"

        Fill="Red">

        <Ellipse.Triggers>

            <EventTrigger RoutedEvent="Ellipse.Loaded">

                <BeginStoryboard>

                    <Storyboard

                        TargetProperty="Width"

                        RepeatBehavior="Forever">

                        <DoubleAnimation

                            FillBehavior="Stop"

                            RepeatBehavior="2x"

                            BeginTime="0:0:1"

                            Duration="0:0:0.25"

                            From="48"

                            To="288" />

                    </Storyboard>

                </BeginStoryboard>

            </EventTrigger>

        </Ellipse.Triggers>

    </Ellipse>

</Window>

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker

댓글을 달아 주세요