Wpf VS2013:查找资源字典时出错
我刚拿到VS2013并打开了我的VS2010项目。但是现在我看不到任何xaml设计。问题是没有应用样式:Wpf VS2013:查找资源字典时出错,wpf,visual-studio-2013,Wpf,Visual Studio 2013,我刚拿到VS2013并打开了我的VS2010项目。但是现在我看不到任何xaml设计。问题是没有应用样式: <UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Themes/Colors.xaml"/> &l
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Themes/Colors.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
主题在VEParameters项目中定义,并声明:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EQPlugin;assembly=VEParameterTool">
<UserControl x:Class="EQPlugin.EQControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:src="clr-namespace:VEParameterTool;assembly=VEParameterTool"
xmlns:l="clr-namespace:EQPlugin"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:oxy="http://oxyplot.codeplex.com"
mc:Ignorable="d">
发生错误的文件位于EqPlugIn目录中,并声明了以下内容:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EQPlugin;assembly=VEParameterTool">
<UserControl x:Class="EQPlugin.EQControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:src="clr-namespace:VEParameterTool;assembly=VEParameterTool"
xmlns:l="clr-namespace:EQPlugin"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:oxy="http://oxyplot.codeplex.com"
mc:Ignorable="d">
我尝试过将路径更改为相对路径,但没有成功,我删除并重新添加了程序集,重新启动了等等,所有项目都是为同一个框架构建的。我不知道还可以尝试什么。尝试下面的一个,提供程序集名称,即使它在同一个程序集中
Source="pack://application:,,,/<assemblyName>;component/Themes/Colors.xaml"
Source=”pack://application:,,,/;组件/Themes/Colors.xaml“
这对我很有用。。。最终。首先,添加pack://application:,,,
似乎没有什么不同。直到我将合并字典中的样式应用于控件,XAML设计器才最终停止显示错误并显示表单。对我来说,在VS2013中,这是可行的。确保Colors.xaml中没有错误。