在我的应用程序,我更倾向于使用相对路径来引用我的资源字典,像这样:什么是引用资源字典的正确方法?
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Assets/ResourceDictionaries/SplashScreen.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
但是,我在我的应用程序,(流利)的参考资源字典使用的图书馆之一我需要的是不同的(我相信他们是所谓的包URI的还是什么?):
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Fluent;component/Themes/Office2013/Generic.xaml" />
</ResourceDictionary.MergedDictionaries>
<Color x:Key="{x:Static Fluent:MetroColors.ThemeColorKey}">#60327A</Color>
<vm:MainWindowViewModel x:Key="MainWindowViewModel" />
</ResourceDictionary>
</Application.Resources>
是否有一个“正确”的方式,我要引用我的资源字典?
这对我很有用。谢谢。 :-) – Jake