静态资源样式引用到自定义控件

This commit is contained in:
wule committed 2026-06-16 03:45:05 +08:00
1 parent 167885814e
commit 3fe394c8da
18 files changed
+191 -51

No files matched your search

+4 -3
View File
@@ -4,14 +4,16 @@
<Style x:Key="BaseWindowStyle" TargetType="Window">
<Setter Property="Background" Value="#FF98638f"/>
<Setter Property="Foreground" Value="#FF666666"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontSize" Value="14"/>
<!-- 其他样式设置 -->
</Style>
<Style x:Key="BaseNoneBorderWindowStyle" TargetType="Window">
<Setter Property="Background" Value="#FF98638f"/>
<Setter Property="BorderBrush" Value="#6b5393"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="#FF666666"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="AllowsTransparency" Value="True"/>
</Style>
@@ -28,7 +30,6 @@
</Setter.Value>
</Setter>
</Style>-->
<!--<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
@@ -0,0 +1,5 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ImageBrush x:Key="imgBrushClose" ImageSource="/Resources/WindowBoxes/close.png" Stretch="Uniform"/>
<ImageBrush x:Key="imgBrushCloseHover" ImageSource="/Resources/WindowBoxes/close.hover.png" Stretch="Uniform"/>
</ResourceDictionary>
@@ -0,0 +1,14 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BitmapImage x:Key="imgMin" UriSource="/Resources/WindowBoxes/min.png"/>
<BitmapImage x:Key="imgMinHover" UriSource="/Resources/WindowBoxes/min.hover.png"/>
<BitmapImage x:Key="imgNormal" UriSource="/Resources/WindowBoxes/normal.png"/>
<BitmapImage x:Key="imgNormalHover" UriSource="/Resources/WindowBoxes/normal.hover.png"/>
<BitmapImage x:Key="imgMax" UriSource="/Resources/WindowBoxes/max.png"/>
<BitmapImage x:Key="imgMaxHover" UriSource="/Resources/WindowBoxes/max.hover.png"/>
<BitmapImage x:Key="imgClose" UriSource="/Resources/WindowBoxes/close.png"/>
<BitmapImage x:Key="imgCloseHover" UriSource="/Resources/WindowBoxes/close.hover.png"/>
<BitmapImage x:Key="imgBaseMsgErr" UriSource="/Resources/BaseMsgErr.png"/>
<BitmapImage x:Key="imgBaseMsgInfo" UriSource="/Resources/BaseMsgInfo.png"/>
<BitmapImage x:Key="imgBaseMsgQue" UriSource="/Resources/BaseMsgQue.png"/>
</ResourceDictionary>