129 lines
6.5 KiB
XML
129 lines
6.5 KiB
XML
<Application x:Class="WindowsToolbox.App.App"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:WindowsToolbox.App"
|
|
StartupUri="MainWindow.xaml">
|
|
<Application.Resources>
|
|
<local:PageVisibilityConverter x:Key="PageVisibilityConverter" />
|
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
|
|
|
<SolidColorBrush x:Key="BackgroundBrush" Color="#F3F6FA" />
|
|
<SolidColorBrush x:Key="SidebarBrush" Color="#111827" />
|
|
<SolidColorBrush x:Key="PrimaryBrush" Color="#2563EB" />
|
|
<SolidColorBrush x:Key="PrimaryHoverBrush" Color="#1D4ED8" />
|
|
<SolidColorBrush x:Key="DangerBrush" Color="#DC2626" />
|
|
<SolidColorBrush x:Key="DangerHoverBrush" Color="#B91C1C" />
|
|
<SolidColorBrush x:Key="TextBrush" Color="#172033" />
|
|
<SolidColorBrush x:Key="MutedTextBrush" Color="#64748B" />
|
|
<SolidColorBrush x:Key="BorderBrush" Color="#E2E8F0" />
|
|
|
|
<Style TargetType="Window">
|
|
<Setter Property="FontFamily" Value="Segoe UI Variable Text, Microsoft YaHei UI" />
|
|
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
|
|
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType" />
|
|
</Style>
|
|
|
|
<Style x:Key="CardStyle" TargetType="Border">
|
|
<Setter Property="Background" Value="White" />
|
|
<Setter Property="CornerRadius" Value="12" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="Padding" Value="22" />
|
|
<Setter Property="Margin" Value="0,0,0,16" />
|
|
</Style>
|
|
|
|
<Style x:Key="PageTitleStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="28" />
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
|
<Setter Property="Margin" Value="0,0,0,6" />
|
|
</Style>
|
|
|
|
<Style x:Key="SectionTitleStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="18" />
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
|
<Setter Property="Margin" Value="0,0,0,6" />
|
|
</Style>
|
|
|
|
<Style x:Key="DescriptionStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="13" />
|
|
<Setter Property="Foreground" Value="{StaticResource MutedTextBrush}" />
|
|
<Setter Property="TextWrapping" Value="Wrap" />
|
|
<Setter Property="LineHeight" Value="20" />
|
|
</Style>
|
|
|
|
<Style x:Key="BaseButtonStyle" TargetType="Button">
|
|
<Setter Property="MinHeight" Value="38" />
|
|
<Setter Property="Padding" Value="18,8" />
|
|
<Setter Property="Margin" Value="0,10,10,0" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Cursor" Value="Hand" />
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="ButtonBorder"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="8"
|
|
Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ButtonBorder" Property="Opacity" Value="0.88" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="ButtonBorder" Property="Opacity" Value="0.72" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="ButtonBorder" Property="Opacity" Value="0.45" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="PrimaryButtonStyle" TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}">
|
|
<Setter Property="Background" Value="{StaticResource PrimaryBrush}" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</Style>
|
|
|
|
<Style x:Key="SecondaryButtonStyle" TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}">
|
|
<Setter Property="Background" Value="#EFF4FA" />
|
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
</Style>
|
|
|
|
<Style x:Key="DangerButtonStyle" TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}">
|
|
<Setter Property="Background" Value="{StaticResource DangerBrush}" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</Style>
|
|
|
|
<Style x:Key="InputStyle" TargetType="TextBox">
|
|
<Setter Property="MinHeight" Value="38" />
|
|
<Setter Property="Padding" Value="10,7" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Background" Value="White" />
|
|
<Setter Property="BorderBrush" Value="#CBD5E1" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
</Style>
|
|
|
|
<Style TargetType="ComboBox">
|
|
<Setter Property="MinHeight" Value="38" />
|
|
<Setter Property="Padding" Value="10,6" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
</Style>
|
|
|
|
<Style TargetType="CheckBox">
|
|
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Margin" Value="0,10,0,0" />
|
|
</Style>
|
|
</Application.Resources>
|
|
</Application>
|