命名调整
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user