■ DoubleAnimationUsingPath 엘리먼트 사용하기

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

 

<Window

    x:Class="TestProject.MainWindow"

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

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

    Width="800"

    Height="600"

    Title="DoubleAnimationUsingPath 엘리먼트 사용하기">

    <Grid>

        <TextBlock x:Name="textBlock"

            HorizontalAlignment="Center"

            VerticalAlignment="Center"

            FontFamily="Arial Black"

            FontSize="144pt"

            Text="XAML">

            <TextBlock.Triggers>

                <EventTrigger RoutedEvent="TextBlock.Loaded">

                    <BeginStoryboard>

                        <Storyboard

                            TargetName="textBlock"

                            TargetProperty="Opacity"

                            RepeatBehavior="Forever">

                            <DoubleAnimationUsingPath

                                Duration="0:0:4"

                                Source="Y">

                                <DoubleAnimationUsingPath.PathGeometry>

                                    <PathGeometry>

                                        <PathGeometry.Figures>

                                            <PathFigure StartPoint="0 0">

                                                <LineSegment Point="0 1" />

                                                <LineSegment Point="2 1" />

                                                <LineSegment Point="2 0" />

                                            </PathFigure>

                                        </PathGeometry.Figures>

                                    </PathGeometry>

                                </DoubleAnimationUsingPath.PathGeometry>

                            </DoubleAnimationUsingPath>

                        </Storyboard>

                    </BeginStoryboard>

                </EventTrigger>

            </TextBlock.Triggers>

        </TextBlock>    

    </Grid>

</Window>

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

Posted by 사용자 icodebroker

댓글을 달아 주세요