■ OpacityAnimation 엘리먼트를 사용해 불투명도 애니메이션을 만드는 방법을 보여준다.
▶ 예제 코드 (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
xmlns:ctwa="using:CommunityToolkit.WinUI.Animations" <Button Name="button" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="10 10 10 10" Content="Click me!"> <ctwa:Explicit.Animations> <ctwa:AnimationSet x:Name="fadeInAnimationSet"> <ctwa:OpacityAnimation From="0" To="1" /> <ctwa:TranslationAnimation From="-20,0,0" To="0" /> </ctwa:AnimationSet> </ctwa:Explicit.Animations> </Button> |