我一直在试图弄清楚如何组织我的ResourceDictionary文件以便重用并与我团队的其他成员共享.
我一直遇到"Generic.xaml",但如果我在MSDN上查看Generic.xaml或者只是进行谷歌搜索,我似乎只会发现博客文章和论坛问题 - 我似乎无法打击任何真正权威和清晰的东西.
Generic.xaml和MyRandomlyNamedResourceDictionary.xaml有什么区别?看起来无论哪种方式,我都必须使用Source属性引用存储在库中的ResourceDictionaries.例如,:
<Application.Resources>
<ResourceDictionary
Source="/CommonLibraryWpfThemes;component/Themes/Generic.xaml"
</Application.Resources>
Run Code Online (Sandbox Code Playgroud)
那么Generic.xaml有什么优势呢?如果我不试图给我的应用程序多个"外观"(即,如果我只有一个主题),它是否有任何目的?