hotfix: 修复 BAML 反序列化运行时错误 (v2.0.2)
问题: 启动时报 System.Windows.Baml2006.DeferredBinaryDeserializerExtension 异常 根因: ResourceDictionary 中使用了不合法的共享资源类型 修复: - 移除主题中 DropShadowEffect/CubicEase/QuadraticEase/Duration 共享资源 - 将所有 Effect 和 EasingFunction 改为内联声明 - 修复 DynamicResource 引用
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
CornerRadius="{DynamicResource WindowCornerRadius}"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource BorderBrush}"
|
||||
Effect="{DynamicResource WindowShadow}"
|
||||
Effect="{StaticResource WindowShadowInline}"
|
||||
ClipToBounds="True"
|
||||
Opacity="0">
|
||||
|
||||
@@ -278,6 +278,13 @@
|
||||
<!-- ===== 窗口级样式资源 ===== -->
|
||||
<Window.Resources>
|
||||
|
||||
<!-- 窗口阴影(必须为 StaticResource,Effect 不能跨元素共享) -->
|
||||
<DropShadowEffect x:Key="WindowShadowInline"
|
||||
ShadowDepth="4"
|
||||
BlurRadius="24"
|
||||
Opacity="0.6"
|
||||
Color="#000000" />
|
||||
|
||||
<!-- ===== 主要按钮样式(强调色背景,悬停缩放) ===== -->
|
||||
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
|
||||
@@ -85,14 +85,6 @@
|
||||
<!-- 半透明遮罩画刷 -->
|
||||
<SolidColorBrush x:Key="OverlayBrush" Color="#000000" Opacity="0.3" />
|
||||
|
||||
<!-- ===== 动画参数 ===== -->
|
||||
<!-- 标准动画时长(300ms) -->
|
||||
<Duration x:Key="AnimationDuration">0:0:0.300</Duration>
|
||||
<!-- 快速动画时长(200ms) -->
|
||||
<Duration x:Key="FastAnimationDuration">0:0:0.200</Duration>
|
||||
<!-- 慢速动画时长(500ms) -->
|
||||
<Duration x:Key="SlowAnimationDuration">0:0:0.500</Duration>
|
||||
|
||||
<!-- ===== 圆角参数 ===== -->
|
||||
<!-- 标准圆角半径 -->
|
||||
<CornerRadius x:Key="StandardCornerRadius">8</CornerRadius>
|
||||
@@ -115,32 +107,6 @@
|
||||
<!-- ===== 字体族 ===== -->
|
||||
<FontFamily x:Key="DefaultFontFamily">Microsoft YaHei UI</FontFamily>
|
||||
|
||||
<!-- ===== 阴影效果 ===== -->
|
||||
<!-- 窗口阴影:深层阴影,营造浮动感 -->
|
||||
<DropShadowEffect x:Key="WindowShadow"
|
||||
ShadowDepth="4"
|
||||
BlurRadius="24"
|
||||
Opacity="0.6"
|
||||
Color="#000000" />
|
||||
<!-- 卡片阴影:柔和投影 -->
|
||||
<DropShadowEffect x:Key="CardShadow"
|
||||
ShadowDepth="2"
|
||||
BlurRadius="12"
|
||||
Opacity="0.4"
|
||||
Color="#000000" />
|
||||
<!-- 按钮阴影:微妙阴影 -->
|
||||
<DropShadowEffect x:Key="ButtonShadow"
|
||||
ShadowDepth="1"
|
||||
BlurRadius="6"
|
||||
Opacity="0.3"
|
||||
Color="#000000" />
|
||||
|
||||
<!-- ===== 缓动函数 ===== -->
|
||||
<!-- 标准缓入缓出 -->
|
||||
<CubicEase x:Key="StandardCubicEase" EasingMode="EaseInOut" />
|
||||
<!-- 缓出效果 -->
|
||||
<CubicEase x:Key="EaseOutCubicEase" EasingMode="EaseOut" />
|
||||
<!-- 缓入效果 -->
|
||||
<CubicEase x:Key="EaseInCubicEase" EasingMode="EaseIn" />
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
Reference in New Issue
Block a user