Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wpf 合并的ResourceDictionary中存在无效字符_Wpf_Resharper_Resourcedictionary_Mergeddictionaries - Fatal编程技术网

Wpf 合并的ResourceDictionary中存在无效字符

Wpf 合并的ResourceDictionary中存在无效字符,wpf,resharper,resourcedictionary,mergeddictionaries,Wpf,Resharper,Resourcedictionary,Mergeddictionaries,我有以下资源字典 <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack:

我有以下资源字典

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

   <ResourceDictionary.MergedDictionaries>
       <ResourceDictionary Source="pack://application:,,,/Asi.Ui.CustomControls;component/Themes/ExpanderItem.xaml" />
   </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

我在“应用程序:,,”上收到Resharper 7.1.3错误,报告“路径中的字符无效”

据我所知,这是合并词典的正确语法。我的语法有问题吗?如果语法正确,为什么会出现此错误


代码编译后似乎运行良好,但我不确定这是否会在以后影响我。

我在引用的xaml程序集中添加了对“System.Windows”的引用时遇到了相同的问题,在您的示例中,该程序集是Asi.Ui.CustomControls。删除此引用修复了错误


尽管应用程序成功地生成并运行了报告的问题,但它有一个恼人的副作用,即intellisense在编辑字典源路径时停止工作。

尝试关闭设计器并再次打开它。。。或者重建你的解决方案……是的,我试过了。进行了一次清洁、封闭和重建。不走运。你对那些资源字典的构建操作是什么?Page?它由App.xaml使用,因此它是一个应用程序。这是来自MSDN的pack://application:,,,/ReferencedAssembly;component/Subfolder/ResourceFile.xaml和您的看起来一样,所以不要担心:)我从另一个项目合并字典时发现了同样的问题,就像OP一样。有趣的是,我通过删除对System.Windows的引用(而不是.xaml所在的版本)解决了这个问题。谢谢你的帖子。这让我省去了很多头痛:)