<Window x:Class="Day02.Ex21"

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

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

    Title="Ex21" Height="300" Width="300" Name="window1" Background="White">

<!--<Window> 이름과 기본배경 설정-->

 

<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">

<RadioButton Content="Red">

<RadioButton.Triggers>

<EventTrigger RoutedEvent="RadioButton.Checked">

<BeginStoryboard>

<Storyboard>

<ColorAnimation

Storyboard.TargetName="window1"

Storyboard.TargetProperty="Background.Color"

<!--<window1> background 변경하는게 아니라

<background><solidbrush> 변경해야하므로-->

To="Red" AutoReverse="True" RepeatBehavior="3x"

Duration="0:0:1"/>

</Storyboard>

</BeginStoryboard>

</EventTrigger>

</RadioButton.Triggers>

</RadioButton>

</StackPanel>

</Window>


by 피요히코~ 2009. 2. 25. 13:03