moderate.xaml 2.5 KB
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:OS.Spin.View.Style">
    <Style x:Key="222" TargetType="{x:Type Button}">
        <!--<Setter Property ="GroupName" Value="SelectTicket"/>-->
        <Setter Property="Height" Value="40"></Setter>
        <Setter Property="Width" Value="130"></Setter>
        <Setter Property="FontSize" Value="18"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="ContentContainer"  Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" SnapsToDevicePixels="True" BorderBrush="Transparent"  
                            BorderThickness="0" VerticalAlignment="Center" HorizontalAlignment="Stretch" CornerRadius="2">
                        <TextBlock Text="{TemplateBinding Content}" Foreground="White"   VerticalAlignment="Center"  TextAlignment="Center" HorizontalAlignment="Center"/>
                        <Border.Background>
                            <ImageBrush ImageSource="/Images/DefectImages/中度瑕疵0.png"/>
                        </Border.Background>
                    </Border>
                    <ControlTemplate.Triggers>
                        <!--<Trigger  Property="IsMouseOver"  Value="True">
                            <Setter Property="Background" TargetName="ContentContainer">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/Images/微小瑕疵0.png"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>-->
                        <Trigger Property="IsEnabled" Value="True"></Trigger>
                        <Trigger  Property="IsPressed"  Value="True">
                            <!--<Trigger Property="IsMouseOver" Value="True">-->
                            <Setter Property="Background" TargetName="ContentContainer">
                                <Setter.Value>
                                    <ImageBrush ImageSource="/Images/DefectImages/中度瑕疵.png"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>

                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>