WPF_在APP.xaml应用资源样式
先上代码:
1 <Application x:Class="NetAnalysis.App" 2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 4 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 5 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 6 xmlns:l="clr-namespace:NetAnalysis.Common" 7 StartupUri="Pages/UserDefined/UserDefinedPage.xaml"> 8 <Application.Resources> 9 <ResourceDictionary> 10 <ResourceDictionary.MergedDictionaries> 11 12 <ResourceDictionary Source="pack://application:,,,/DictionaryStyle;component/ControlStyle/Dictionaryapp_page.xaml"/> 13 <ResourceDictionary Source="pack://application:,,,/DictionaryStyle;component/ControlStyle/DictionaryDarwSoftware_page.xaml"/> 14 15 </ResourceDictionary.MergedDictionaries> 16 </ResourceDictionary> 17 18 </Application.Resources> 19 </Application>
不是单独的项目,可以直接用Source="路径就可以了";其它的一定要引用生成的样式资源dll,不然会报找不到。
作者:Ants_double
出处:https://www.cnblogs.com/ants_double/
本文版权归作者和博客园所有,欢迎转载。转载请在留言板处留言给我,且在文章标明原文链接,谢谢!
如果您觉得本篇博文对您有所收获,觉得我还算用心,请点击右下角的 [大拇指],谢谢!