更新
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
|
||||
using System.Reflection;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace WPFluent.Markup;
|
||||
@@ -9,7 +10,7 @@ namespace WPFluent.Markup;
|
||||
/// 提供一个字典实现,其中包含 WPF 应用程序的组件和其他元素使用的 <c>WPF UI</c> 控件资源。
|
||||
/// </summary>
|
||||
/// <example>
|
||||
/// <code lang="xml"> /// <Application /// xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"> ///
|
||||
/// <code lang="xml">/// <Application /// xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"> ///
|
||||
/// <Application.Resources> /// <ResourceDictionary> ///
|
||||
/// <ResourceDictionary.MergedDictionaries> /// <ui:ControlsDictionary /> ///
|
||||
/// </ResourceDictionary.MergedDictionaries> /// </ResourceDictionary> ///
|
||||
@@ -20,11 +21,7 @@ namespace WPFluent.Markup;
|
||||
[UsableDuringInitialization(true)]
|
||||
public class ControlsDictionary : ResourceDictionary
|
||||
{
|
||||
private const string DictionaryUri = "pack://application:,,,/WPFluent;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
|
||||
/// cref="ResourceDictionary.Source"/> of the <c>WPF UI</c> controls dictionary.
|
||||
/// </summary>
|
||||
public ControlsDictionary() { Source = new Uri(DictionaryUri, UriKind.Absolute); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user