- 아래그림의 '솔루션 탐색기'에서 '이미지'파일인 "silverlight.png"파일을 추가한다.









[MainPage.xaml]


<UserControl x:Class="RiaDoubleAnimation.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:DesignHeight="300" d:DesignWidth="400">

 

    <Grid x:Name="LayoutRoot" Background="White">

        <Image x:Name="imgLogo" Source="silverlight.png">

            <Image.Triggers>

                <EventTrigger RoutedEvent="Image.Loaded">

                    <BeginStoryboard>

                        <Storyboard>

                            <DoubleAnimation

                                Storyboard.TargetName="imgLogo"

                                Storyboard.TargetProperty="Opacity"

                               

                                Duration="0.0:0:2.5"

                                From="0.0"

                                To="1.0"

                                AutoReverse="True"

                                RepeatBehavior="Forever"

                            />

                        </Storyboard>

                    </BeginStoryboard>

                </EventTrigger>

            </Image.Triggers>

        </Image>

    </Grid>

</UserControl>

 

 























Posted by holland14
: