■ PointAnimationUsingPath 엘리먼트 사용하기

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

 

<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="PointAnimationUsingPath 엘리먼트 사용하기">

    <Canvas>

        <Path Stroke="Black" Data="M 96 288 C 576 0, 0 0, 480 288" />

        <Path Fill="Blue">

            <Path.Data>

                <EllipseGeometry x:Name="ellipseGeometry"

                    RadiusX="12"

                    RadiusY="12" />

            </Path.Data>

            <Path.Triggers>

                <EventTrigger RoutedEvent="Path.Loaded">

                    <BeginStoryboard>

                        <Storyboard

                            TargetName="ellipseGeometry"

                            TargetProperty="Center">

                            <PointAnimationUsingPath

                                RepeatBehavior="Forever"

                                AutoReverse="True"

                                Duration="0:0:2.5">

                                <PointAnimationUsingPath.PathGeometry>

                                    <PathGeometry Figures="M 96 288 C 576 0, 0 0, 480 288" />

                                </PointAnimationUsingPath.PathGeometry>

                            </PointAnimationUsingPath>

                        </Storyboard>

                    </BeginStoryboard>

                </EventTrigger>

            </Path.Triggers>

        </Path>

    </Canvas>

</Window>

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

Posted by 사용자 icodebroker

댓글을 달아 주세요