本文介绍了我如何...发生Xaml Parse异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 < Window.Resources > < ResourceDictionary > < ResourceDictionary.MergedDictionaries > < ResourceDictionary 来源 = / Dic.xaml / > < / ResourceDictionary.MergedDictionaries > < / ResourceDictionary > < / Window.Resources > 发生了'System.Windows.Markup.XamlParseException'类型的第一次机会异常PresentationFramework.dll 附加信息:'设置属性'System.Windows.ResourceDictionary.Source'抛出异常。'行号'9'和行位置'18' 。 如何解决这个异常,请帮帮我,,, 解决方案 使用以下, 如果您在文件夹中有 Dic.xaml ,请使用以下内容, < ; ResourceDictionary Source = / YouProjectNamespaceHere; Component / YourFolderNameHere / Dic.xaml /> 否则,请使用 < ; ResourceDictionary Source = / YouProjectNamespaceHere; Component / Dic.xaml /> <Window.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Dic.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Window.Resources>A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dllAdditional information: 'Set property 'System.Windows.ResourceDictionary.Source' threw an exception.' Line number '9' and line position '18'.How to resolve this exception, Please help me,,, 解决方案 Hi, use the following, If you are having Dic.xaml inside a folder, then use the following,<ResourceDictionary Source="/YouProjectNamespaceHere;Component/YourFolderNameHere/Dic.xaml" />Otherwise, use<ResourceDictionary Source="/YouProjectNamespaceHere;Component/Dic.xaml" /> 这篇关于我如何...发生Xaml Parse异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-11 09:51