첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
------------------------------------------------------------------------------------------------------------------------------------------------------
728x90
728x170

TestProject.zip
다운로드

▶ MainWindow.xaml

<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="ColorAnimationUsingKeyFrames 엘리먼트 사용하기"
    FontFamily="나눔고딕코딩"
    FontSize="16">
    <Canvas
        Margin="100"
        Background="Red">
        <Canvas.Triggers>
            <EventTrigger RoutedEvent="Canvas.Loaded">
                <BeginStoryboard>
                    <Storyboard TargetProperty="Background.Color">
                        <ColorAnimationUsingKeyFrames RepeatBehavior="Forever">
                            <LinearColorKeyFrame KeyTime="0:0:0" Value="Red"    />
                            <LinearColorKeyFrame KeyTime="0:0:1" Value="Orange" />
                            <LinearColorKeyFrame KeyTime="0:0:2" Value="Yellow" />
                            <LinearColorKeyFrame KeyTime="0:0:3" Value="Green"  />
                            <LinearColorKeyFrame KeyTime="0:0:4" Value="Blue"   />
                            <LinearColorKeyFrame KeyTime="0:0:5" Value="Indigo" />
                            <LinearColorKeyFrame KeyTime="0:0:6" Value="Violet" />
                            <LinearColorKeyFrame KeyTime="0:0:7" Value="Red"    />
                        </ColorAnimationUsingKeyFrames>
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Canvas.Triggers>
    </Canvas>
</Window>
728x90
그리드형(광고전용)
Posted by icodebroker
,