You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
209 lines
10 KiB
209 lines
10 KiB
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
<!-- 现代化淡蓝色主题颜色 -->
|
|
<Color x:Key="PrimaryBlue">#0078D7</Color>
|
|
<Color x:Key="LightBlue">#E3F2FD</Color>
|
|
<Color x:Key="SoftBlue">#BBDEFB</Color>
|
|
<Color x:Key="AccentBlue">#2196F3</Color>
|
|
<Color x:Key="WarningOrange">#FF9800</Color>
|
|
<Color x:Key="ErrorRed">#F44336</Color>
|
|
<Color x:Key="SuccessGreen">#4CAF50</Color>
|
|
<Color x:Key="NeutralGray">#607D8B</Color>
|
|
<SolidColorBrush x:Key="PrimaryBlueBrush" Color="{StaticResource PrimaryBlue}"/>
|
|
<SolidColorBrush x:Key="LightBlueBrush" Color="{StaticResource LightBlue}"/>
|
|
<SolidColorBrush x:Key="SoftBlueBrush" Color="{StaticResource SoftBlue}"/>
|
|
<SolidColorBrush x:Key="AccentBlueBrush" Color="{StaticResource AccentBlue}"/>
|
|
<SolidColorBrush x:Key="WarningBrush" Color="{StaticResource WarningOrange}"/>
|
|
<SolidColorBrush x:Key="ErrorBrush" Color="{StaticResource ErrorRed}"/>
|
|
<SolidColorBrush x:Key="SuccessBrush" Color="{StaticResource SuccessGreen}"/>
|
|
<SolidColorBrush x:Key="NeutralBrush" Color="{StaticResource NeutralGray}"/>
|
|
<!-- 空状态样式 -->
|
|
<Style x:Key="EmptyStateContainerStyle" TargetType="Border">
|
|
<Setter Property="Background" Value="#FFF9F9F9"/>
|
|
<Setter Property="CornerRadius" Value="8"/>
|
|
<Setter Property="BorderBrush" Value="#FFE0E0E0"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="20"/>
|
|
</Style>
|
|
|
|
<Style x:Key="EmptyStateIconStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="48"/>
|
|
<Setter Property="Foreground" Value="#FFCCCCCC"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="0,0,0,10"/>
|
|
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
|
|
</Style>
|
|
|
|
<Style x:Key="EmptyStateTextStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="14"/>
|
|
<Setter Property="Foreground" Value="#FF666666"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="TextAlignment" Value="Center"/>
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
<Setter Property="Margin" Value="0,0,0,15"/>
|
|
</Style>
|
|
<!-- 错误状态样式 -->
|
|
<Style x:Key="ErrorStateContainerStyle" TargetType="Border">
|
|
<Setter Property="Background" Value="#FFFEF2F2"/>
|
|
<Setter Property="CornerRadius" Value="8"/>
|
|
<Setter Property="BorderBrush" Value="#FFE57373"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="20"/>
|
|
</Style>
|
|
|
|
<Style x:Key="ErrorStateIconStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="48"/>
|
|
<Setter Property="Foreground" Value="#FFD32F2F"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="0,0,0,10"/>
|
|
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
|
|
</Style>
|
|
|
|
<Style x:Key="ErrorStateTextStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="14"/>
|
|
<Setter Property="Foreground" Value="#FFD32F2F"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="TextAlignment" Value="Center"/>
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
<Setter Property="Margin" Value="0,0,0,15"/>
|
|
</Style>
|
|
|
|
<!-- 现代化错误状态样式(带滚动支持) -->
|
|
<Style x:Key="ModernErrorStateContainerStyle" TargetType="Border">
|
|
<Setter Property="Background" Value="#FFFEF7F7"/>
|
|
<Setter Property="CornerRadius" Value="12"/>
|
|
<Setter Property="BorderBrush" Value="#FFFDEDED"/>
|
|
<Setter Property="BorderThickness" Value="2"/>
|
|
<Setter Property="Padding" Value="30"/>
|
|
<Setter Property="Effect">
|
|
<Setter.Value>
|
|
<DropShadowEffect BlurRadius="20" ShadowDepth="2" Opacity="0.1" Color="{StaticResource ErrorRed}"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ModernErrorStateIconStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="64"/>
|
|
<Setter Property="Foreground" Value="{StaticResource ErrorBrush}"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="0,0,0,10"/>
|
|
<Setter Property="FontFamily" Value="Segoe Fluent Icons"/>
|
|
<Setter Property="Opacity" Value="0.9"/>
|
|
</Style>
|
|
|
|
<Style x:Key="ModernErrorStateTitleStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="18"/>
|
|
<Setter Property="Foreground" Value="{StaticResource ErrorBrush}"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="TextAlignment" Value="Center"/>
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
<Setter Property="Margin" Value="0,0,0,8"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
</Style>
|
|
|
|
<Style x:Key="ModernErrorStateTextStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="14"/>
|
|
<Setter Property="Foreground" Value="#FF795548"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="TextAlignment" Value="Center"/>
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
<Setter Property="Margin" Value="0,0,0,5"/>
|
|
<Setter Property="LineHeight" Value="20"/>
|
|
</Style>
|
|
|
|
<!-- 可滚动错误状态容器样式 -->
|
|
<Style x:Key="ScrollableErrorStateContainerStyle" TargetType="Border">
|
|
<Setter Property="Background" Value="#FFFEF7F7"/>
|
|
<Setter Property="CornerRadius" Value="12"/>
|
|
<Setter Property="BorderBrush" Value="#FFFDEDED"/>
|
|
<Setter Property="BorderThickness" Value="2"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="Effect">
|
|
<Setter.Value>
|
|
<DropShadowEffect BlurRadius="20" ShadowDepth="2" Opacity="0.1" Color="{StaticResource ErrorRed}"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- 错误状态内容容器 -->
|
|
<Style x:Key="ErrorContentContainerStyle" TargetType="StackPanel">
|
|
<!--<Setter Property="Padding" Value="30,40,30,30"/>-->
|
|
<Setter Property="MaxHeight" Value="400"/>
|
|
<!-- 设置最大高度,超过时显示滚动条 -->
|
|
</Style>
|
|
<!-- 关闭按钮样式 -->
|
|
<Style x:Key="CloseButtonStyle" TargetType="Button">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Foreground" Value="#FF666666"/>
|
|
<Setter Property="Width" Value="28"/>
|
|
<Setter Property="Height" Value="28"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="Border"
|
|
Background="{TemplateBinding Background}"
|
|
CornerRadius="14">
|
|
<TextBlock x:Name="CloseIcon"
|
|
Text=""
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="12"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="#FFE0E0E0"/>
|
|
<Setter TargetName="CloseIcon" Property="Foreground" Value="#FF333333"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="#FFCCCCCC"/>
|
|
<Setter TargetName="CloseIcon" Property="Foreground" Value="#FF000000"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- 错误状态关闭按钮样式 -->
|
|
<Style x:Key="ErrorCloseButtonStyle" TargetType="Button" BasedOn="{StaticResource CloseButtonStyle}">
|
|
<Setter Property="Foreground" Value="{StaticResource ErrorBrush}"/>
|
|
<Setter Property="Opacity" Value="0.7"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="Border"
|
|
Background="Transparent"
|
|
CornerRadius="14">
|
|
<TextBlock x:Name="CloseIcon"
|
|
Text=""
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="12"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource ErrorBrush}"/>
|
|
<Setter TargetName="CloseIcon" Property="Foreground" Value="White"/>
|
|
<Setter Property="Opacity" Value="1"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="#FFD32F2F"/>
|
|
<Setter TargetName="CloseIcon" Property="Foreground" Value="White"/>
|
|
<Setter Property="Opacity" Value="1"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ResourceDictionary>
|