命名调整

This commit is contained in:
GG Z
2025-07-12 23:31:32 +08:00
parent 4d35cadb56
commit 6d96da6f90
88 changed files with 3975 additions and 2763 deletions

View File

@@ -34,6 +34,19 @@ namespace WPFDark
public static Brush CheckerBrush => _CheckerBrush ??= (Brush) ThemeManager.Current.TryFindResource("CheckerBrush");
private static Brush? _CheckerBrush;
public static readonly DoubleColor[] PresetColors =
{
DoubleColor.Zero,
new DoubleColor{R = 0xF4/(double)0xFF, G = 0x43/(double)0xFF, B = 0x36/(double)0xFF, A = 1.0},
new DoubleColor{R = 0x9C/(double)0xFF, G = 0x27/(double)0xFF, B = 0xB0/(double)0xFF, A = 1.0},
new DoubleColor{R = 0x3F/(double)0xFF, G = 0x51/(double)0xFF, B = 0xB5/(double)0xFF, A = 1.0},
new DoubleColor{R = 0x03/(double)0xFF, G = 0xA9/(double)0xFF, B = 0xF4/(double)0xFF, A = 1.0},
new DoubleColor{R = 0x00/(double)0xFF, G = 0x96/(double)0xFF, B = 0x88/(double)0xFF, A = 1.0},
new DoubleColor{R = 0x8B/(double)0xFF, G = 0xC3/(double)0xFF, B = 0x4A/(double)0xFF, A = 1.0},
new DoubleColor{R = 0xFF/(double)0xFF, G = 0xEB/(double)0xFF, B = 0x3B/(double)0xFF, A = 1.0},
new DoubleColor{R = 0xFF/(double)0xFF, G = 0x98/(double)0xFF, B = 0x00/(double)0xFF, A = 1.0},
};
}
public enum BiaWindowCloseButtonBehavior

View File

@@ -318,11 +318,11 @@ namespace WPFDark.Controls
// ToolTipService.BetweenShowDelayProperty.OverrideMetadata(
// typeof(FrameworkElement), new FrameworkPropertyMetadata(Boxes.Int0));
}
public BiaWindow()
{
//将指定的属性与资源字典中的资源关联起来
SetResourceReference(StyleProperty, typeof(BiaWindow));
}
//public BiaWindow()
//{
// //将指定的属性与资源字典中的资源关联起来
// SetResourceReference(StyleProperty, typeof(BiaWindow));
//}
internal void InvokeCloseButtonClicked()
{
CloseButtonClicked?.Invoke(this, EventArgs.Empty);

View File

@@ -8,7 +8,7 @@ namespace WPFDark;
[UsableDuringInitialization(true)]
public class ControlsDictionary : ResourceDictionary
{
private string DictionaryUri => $"pack://application:,,,/{ThemeManager.LibraryNamespace};component/Resources/Styles.xaml";
private string DictionaryUri => $"pack://application:,,,/{Assembly.GetExecutingAssembly().GetName().Name};component/Resources/Styles.xaml";
/// <summary>
/// Initializes a new instance of the <see cref="ControlsDictionary"/> class. Default constructor defining <see

View File

@@ -55,3 +55,4 @@ using System.Windows.Markup;
[assembly: XmlnsPrefix("https://github.com/WPFDark", "wpf")]
[assembly: XmlnsDefinition("https://github.com/WPFDark", "WPFDark")]
[assembly: XmlnsDefinition("https://github.com/WPFDark", "WPFDark.Controls")]
[assembly: XmlnsDefinition("https://github.com/WPFDark", "WPFDark.StandardControls")]

View File

@@ -48,7 +48,7 @@ public class ThemeManager
}
private static bool ApplicationHasResources(Application? application)
{
return application
return application is not null && application
.Resources.MergedDictionaries
.Where(e => e.Source is not null)
.Any(