wpf button style IsMouseOver

<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>

 

posted @ 2019-09-18 17:20  FredGrit  阅读(989)  评论(0编辑  收藏  举报