wpf button style IsMouseOver

2021-02-02 15:16

阅读:507

标签:smo   code   tty   trigger   res   set   nbsp   jpg   font   

Style x:Key="workButtonStyle" TargetType="{x:Type Button}">
            Style.Triggers>
                Trigger Property="IsMouseOver" Value="False">
                    Setter Property="FontSize" Value="20"/>
                Trigger>
                Trigger Property="IsMouseOver" Value="True">
                    Setter Property="FontSize" Value="30"/>
                Trigger>
            Style.Triggers>
        Style>
Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}">
            Style.Triggers>
                Trigger Property="IsMouseOver" Value="False">
                    Setter Property="Content">
                        Setter.Value>
                            Image Source="/AT;component/Resource/Images/CloseTrue.jpg"/>
                        Setter.Value>
                    Setter>
                Trigger>
                Trigger Property="IsMouseOver" Value="True">
                    Setter Property="Content">
                        Setter.Value>
                            Image Source="/AT;component/Resource/Images/Close.jpg"/>
                        Setter.Value>
                    Setter>
                Trigger>
            Style.Triggers>
        Style>

 

wpf button style IsMouseOver

标签:smo   code   tty   trigger   res   set   nbsp   jpg   font   

原文地址:https://www.cnblogs.com/Fred1987/p/11543834.html


评论


亲,登录后才可以留言!