From 6bcafc823e836ecd5790f87178a906333699f868 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 10 四月 2025 10:46:47 +0800
Subject: [PATCH] 优化插件结构;
---
HMI.UI/Style/PanuonResource.xaml | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/HMI.UI/Style/PanuonResource.xaml b/HMI.UI/Style/PanuonResource.xaml
index 0b103f5..5d6734a 100644
--- a/HMI.UI/Style/PanuonResource.xaml
+++ b/HMI.UI/Style/PanuonResource.xaml
@@ -12,7 +12,7 @@
xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/HMI.UI;component/Style/Colors.xaml"/>
- <pu:StyleDictionary Includes="PasswordBox,TextBox,ComboBox,Button,DataGrid,TreeView,Menu" />
+ <pu:StyleDictionary Includes="PasswordBox,TextBox,ComboBox,Button,DataGrid,TreeView,Menu,ListBox" />
<ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/>
</ResourceDictionary.MergedDictionaries>
<sys:Double x:Key="TitleFontSize">20</sys:Double>
@@ -290,4 +290,16 @@
Opacity="0"
Visibility="Visible" />
</Popup>
+
+ <Style x:Key="DefaultListBox" TargetType="ListBox" BasedOn="{StaticResource {x:Static pu:StyleKeys.ListBoxStyle}}">
+ <Setter Property="pu:ListBoxHelper.ItemsHoverBackground" Value="{StaticResource SecondPrimaryColor}"/>
+ <Setter Property="pu:ListBoxHelper.ItemsHoverForeground" Value="{StaticResource SecondPrimaryColorContract}"/>
+ <Setter Property="pu:ListBoxHelper.ItemsSelectedBackground" Value="{StaticResource PrimaryColor}"/>
+ <Setter Property="pu:ListBoxHelper.ItemsSelectedForeground" Value="{StaticResource PrimaryColorContract}"/>
+ <Setter Property="pu:ListBoxHelper.ItemsMargin" Value="0"/>
+ <Setter Property="pu:ListBoxHelper.ItemsPadding" Value="7,5,7,5"/>
+ <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ </Style>
</ResourceDictionary>
\ No newline at end of file
--
Gitblit v1.9.1