728x90
728x170
■ BlurBitmapEffect 엘리먼트를 사용해 버튼 클릭시 블러 효과 애니메이션을 적용하는 방법을 보여준다.
▶ 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="BlurBitmapEffect 엘리먼트 : 버튼 클릭시 블러 효과 애니메이션 적용하기"
FontFamily="나눔고딕코딩"
FontSize="16">
<Grid>
<Button
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="100"
Padding="10">
테스트
<Button.BitmapEffect>
<BlurBitmapEffect x:Name="blurBitmapEffect"
Radius="0" />
</Button.BitmapEffect>
<Button.Triggers>
<EventTrigger RoutedEvent="Button.Click">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="blurBitmapEffect"
Storyboard.TargetProperty="Radius"
From="0"
To="40"
Duration="0:0:0.3"
AutoReverse="True" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Button.Triggers>
</Button>
</Grid>
</Window>
728x90
그리드형(광고전용)
'C# > WPF' 카테고리의 다른 글
[C#/WPF] Storyboard 클래스 사용하기 (0) | 2020.08.21 |
---|---|
[C#/WPF] DropShadowBitmapEffect 엘리먼트 사용하기 (0) | 2020.08.21 |
[C#/WPF] DropShadowBitmapEffect 클래스 : 버튼 클릭시 그림자 효과 적용하기 (0) | 2020.08.21 |
[C#/WPF] DropShadowBitmapEffect 엘리먼트 : 버튼 클릭시 그림자 효과 애니메이션 적용하기 (0) | 2020.08.21 |
[C#/WPF] BlurBitmapEffect 엘리먼트 : 버튼을 누를 경우 블러 효과 적용하기 (0) | 2020.08.21 |
[C#/WPF] Application 클래스 : Properties 속성 사용하기 (0) | 2020.08.21 |
[C#/WPF] Application 클래스 : DispatcherUnhandledException 이벤트를 사용하기 (0) | 2020.08.21 |
[C#/WPF] Application 클래스 : Activated/Deactivated 이벤트 사용하기 (0) | 2020.08.21 |
[C#/WPF] Application 클래스 : Shutdown 메소드를 사용해 명시적 애플리케이션 종료하기 (0) | 2020.08.21 |
[C#/WPF] Polygon 엘리먼트 : 별(star) 그리기 (0) | 2020.08.21 |