WPF中怎么在xaml文件里使用合并字典资源中的样式?
<ResourceDictionary x:Key="AppStyle"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary x:Name="nn" Source="../Styles/AppDictionary.xaml"></ResourceDictionary> </ResourceDictionary.MergedDictionaries> </ResourceDictionary>
<!--定义按钮样式--> <Style TargetType="Button" x:Key="CommonBtnStyle"> <Setter Property="Foreground" Value="Black"/>.......
<Application x:Class="WpfApplication12.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> <ResourceDictionary > <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Styles/AppDictionary.xaml"></ResourceDictionary> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources></Application>