20240801_FJEQ_upperpc/FujianEarthquake_seabed/FujianEarthquake/Assets/Styles/DefaultStyle.xaml

29 lines
1.6 KiB
Plaintext
Raw Normal View History

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="WindowControlButtonStyle" TargetType="Button">
<Setter Property="Width" Value="40"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="Transparent" Name="back" CornerRadius="0,10,0,10">
<TextBlock Text="{Binding Content,RelativeSource={RelativeSource AncestorType=Button,Mode=FindAncestor}}"
VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="../Fonts/#iconfont"/>
</Border>
<!--触发事件-->
<ControlTemplate.Triggers>
<!--鼠标移上去显示变化效果-->
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="back" Property="Background" Value="#22FFFFFF"/>
</Trigger>
<!--鼠标点击时颜色加深-->
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="back" Property="Background" Value="#44FFFFFF"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>