728x90
반응형
728x170
▶ 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="Ellipse 엘리먼트 : 커졌다 사라지는 동심원 애니메이션 설정하기"
FontFamily="나눔고딕코딩"
FontSize="16">
<Window.Resources>
<Style TargetType="Ellipse">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Width" Value="0" />
<Setter Property="Height" Value="0" />
<Setter Property="StrokeThickness" Value="2" />
<Style.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard >
<Storyboard
FillBehavior="Stop"
RepeatBehavior="Forever">
<DoubleAnimation
Storyboard.TargetProperty="Width"
Duration="0:0:5"
To="300" />
<DoubleAnimation
Storyboard.TargetProperty="Height"
Duration="0:0:5"
To="300" />
<DoubleAnimation
Storyboard.TargetProperty="Opacity"
Duration="0:0:5"
From="1"
To="0" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<Ellipse Margin="20 0 0 0" Stroke="Red" />
<Ellipse Margin=" 0 10 0 0" Stroke="Orange" />
<Ellipse Margin=" 0 0 20 0" Stroke="Yellow" />
<Ellipse Margin=" 0 0 0 30" Stroke="Green" />
<Ellipse Margin=" 0 0 0 0" Stroke="Blue" />
<Ellipse Margin=" 0 30 10 0" Stroke="DarkBlue" />
<Ellipse Margin="30 0 0 10" Stroke="Purple" />
</Grid>
</Window>
728x90
반응형
그리드형(광고전용)
'C# > WPF' 카테고리의 다른 글
[C#/WPF] Window 클래스 : 윈도우 객체 핸들 구하기 (0) | 2014.02.21 |
---|---|
[C#/WPF] Window 클래스 : 시스템 메뉴 숨기기 (0) | 2014.02.21 |
[C#/WPF] Dispatcher 클래스 : Invoke 메소드를 사용해 크로스 스레드(Cross Thread) 처리하기 (0) | 2014.02.21 |
[C#/WPF] ASCII ART 문자열 구하기 (0) | 2014.02.21 |
[C#/WPF] SolidColorBrush 클래스 : 디폴트 시스템 색상 오버라이딩 하기 (0) | 2014.02.20 |
[C#/WPF] BitmapSource 클래스 : WINFORM Icon 객체에서 비트맵 소스 구하기 (0) | 2014.02.20 |
[C#/WPF] BitmapSource 클래스 : WINFORM Bitmap 객체에서 비트맵 소스 구하기 (0) | 2014.02.20 |
[C#/WPF] ListBox 엘리먼트 : ItemContainerStyle 속성을 사용해 선택한 Icon 항목을 크게 만드는 애니메이션 설정하기 (0) | 2014.02.20 |
[C#/WPF] ListBox 엘리먼트 : ItemContainerStyle 속성을 사용해 항목 크기 애니메이션 설정하기 (0) | 2014.02.20 |
[C#/WPF] ControlTemplate 엘리먼트 : Button 엘리먼트 정의하기 (0) | 2014.02.20 |
댓글을 달아 주세요