更新整理

This commit is contained in:
GG Z
2025-04-24 20:56:44 +08:00
parent 155cef46f8
commit 5b6d67b571
813 changed files with 14437 additions and 12362 deletions

View File

@@ -1,18 +1,15 @@
using System.Collections.ObjectModel;
using WPFluent.Extensions;
using System.Collections.ObjectModel;
namespace WPFluent.Appearance;
/// <summary>
/// Allows managing application dictionaries.
/// </summary>
internal class ResourceDictionaryManager
internal class ResourceDictionaryManager(string searchNamespace)
{
public ResourceDictionaryManager(string searchNamespace) { SearchNamespace = searchNamespace; }
private Collection<ResourceDictionary> GetApplicationMergedDictionaries()
{ return UiApplication.Current.Resources.MergedDictionaries; }
@@ -75,9 +72,9 @@ internal class ResourceDictionaryManager
public bool HasDictionary(string resourceLookup) { return GetDictionary(resourceLookup) != null; }
/// <summary>
/// Shows whether the application contains the <see cref="ResourceDictionary"/>.
/// 显示应用程序是否包含 <see cref="ResourceDictionary"/>.
/// </summary>
/// <param name="resourceLookup">Any part of the resource name.</param>
/// <param name="resourceLookup">资源名称的任何部分。</param>
/// <param name="newResourceUri">A valid <see cref="Uri"/> for the replaced resource.</param>
/// <returns><see langword="true"/> if the dictionary <see cref="Uri"/> was updated. <see langword="false"/> otherwise.</returns>
public bool UpdateDictionary(string resourceLookup, Uri? newResourceUri)
@@ -134,7 +131,7 @@ internal class ResourceDictionaryManager
}
/// <summary>
/// Gets the namespace, e.g. the library the resource is being searched for.
/// 获取命名空间,例如正在搜索的资源库。
/// </summary>
public string SearchNamespace { get; }
public string SearchNamespace { get; } = searchNamespace;
}