53 lines
2.4 KiB
XML
53 lines
2.4 KiB
XML
<Application x:Class="ShanghaiEnvironmentalTechnology.App"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
StartupUri="Main.xaml">
|
|
<Application.Resources>
|
|
<Style x:Key="MyButtonStyle" TargetType="Button">
|
|
<Setter Property="Background" Value="#4A90E2"/>
|
|
<!-- 背景色 -->
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<!-- 字体颜色 -->
|
|
<Setter Property="FontSize" Value="14"/>
|
|
<!-- 字体大小 -->
|
|
<Setter Property="Margin" Value="10"/>
|
|
<!-- 按钮间距 -->
|
|
<Setter Property="Padding" Value="10,5"/>
|
|
<!-- 内边距 -->
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<!-- 边框颜色 -->
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<!-- 边框厚度 -->
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<!-- 鼠标指针 -->
|
|
<Setter Property="Height" Value="40"/>
|
|
<!-- 按钮高度 -->
|
|
<Setter Property="Width" Value="320"/>
|
|
<!-- 按钮宽度 -->
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Background="{TemplateBinding Background}"
|
|
CornerRadius="10"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
<ContentPresenter HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="#3A7BBE"/>
|
|
<!-- 鼠标悬停时的背景色 -->
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Background" Value="#2A5E9A"/>
|
|
<!-- 按下时的背景色 -->
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Application.Resources>
|
|
</Application>
|