WPF Button

参考:

https://blog.csdn.net/qq_43024228/article/details/104886221

https://www.cnblogs.com/xiaomingg/p/8699125.html

 动画效果:

<Window.Resources>
        <Style TargetType="Button">
            <Style.Triggers>
                <!--事件触发器-->
                <EventTrigger RoutedEvent="MouseEnter">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="Opacity" From="1" To="0.1" Duration="0:0:3"></DoubleAnimation>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>

 

posted @ 2024-05-23 03:02  microsoft-zhcn  阅读(3)  评论(0编辑  收藏  举报