码迷,mamicode.com
首页 > Windows程序 > 详细

wpf button style IsMouseOver

时间:2019-09-18 17:51:34      阅读:133      评论:0      收藏:0      [点我收藏+]

标签: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!