Files
client/App.xaml
2026-05-23 18:16:50 +08:00

86 lines
4.1 KiB
XML

<Application x:Class="CloudPrint.Client.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Views/MainWindow.xaml">
<Application.Resources>
<SolidColorBrush x:Key="PrimaryBrush" Color="#2563EB" />
<SolidColorBrush x:Key="PrimaryDarkBrush" Color="#1E40AF" />
<SolidColorBrush x:Key="SurfaceBrush" Color="#FFFFFF" />
<SolidColorBrush x:Key="MutedBrush" Color="#64748B" />
<SolidColorBrush x:Key="PageBrush" Color="#F4F7FB" />
<SolidColorBrush x:Key="BorderBrush" Color="#E2E8F0" />
<SolidColorBrush x:Key="SuccessBrush" Color="#16A34A" />
<SolidColorBrush x:Key="WarningBrush" Color="#D97706" />
<SolidColorBrush x:Key="ErrorBrush" Color="#DC2626" />
<Style TargetType="Window">
<Setter Property="FontFamily" Value="Microsoft YaHei UI" />
<Setter Property="Background" Value="{StaticResource PageBrush}" />
</Style>
<Style TargetType="Button">
<Setter Property="MinHeight" Value="34" />
<Setter Property="Padding" Value="14,6" />
<Setter Property="Margin" Value="0,0,8,0" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Background" Value="{StaticResource PrimaryBrush}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" CornerRadius="8" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource PrimaryDarkBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="TextBox">
<Setter Property="MinHeight" Value="32" />
<Setter Property="Padding" Value="8,4" />
<Setter Property="BorderBrush" Value="#CBD5E1" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<Style TargetType="PasswordBox">
<Setter Property="MinHeight" Value="32" />
<Setter Property="Padding" Value="8,4" />
<Setter Property="BorderBrush" Value="#CBD5E1" />
<Setter Property="BorderThickness" Value="1" />
</Style>
<Style TargetType="DataGrid">
<Setter Property="AutoGenerateColumns" Value="False" />
<Setter Property="CanUserAddRows" Value="False" />
<Setter Property="GridLinesVisibility" Value="Horizontal" />
<Setter Property="HeadersVisibility" Value="Column" />
<Setter Property="RowHeight" Value="36" />
<Setter Property="BorderBrush" Value="#E2E8F0" />
<Setter Property="BorderThickness" Value="1" />
</Style>
<Style x:Key="SecondaryButtonStyle" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Background" Value="#E2E8F0" />
<Setter Property="Foreground" Value="#0F172A" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#CBD5E1" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</Style.Triggers>
</Style>
</Application.Resources>
</Application>