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,不然会报找不到。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM