未能分配给属性“System.Windows.ResourceDictionary.Source”

昨天下午也在报这个错误

昨晚搞几小时,上午调两个来小时,

结果才发现是路径的问题

我日!

发生了 System.Windows.Markup.XamlParseException
Message=未能分配给属性“System.Windows.ResourceDictionary.Source”。 [Line: 24 Position: 36]
LineNumber=24
LinePosition=36
StackTrace:
位于 System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
位于 ESRI.SilverlightViewer.App.InitializeComponent()
位于 ESRI.SilverlightViewer.App..ctor()
InnerException:

加载XAML文件时,就在报错!

未能分配给属性“System.Windows.ResourceDictionary.Source”


结果找到了,是路径的问题App.XAML里面的文件

 <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/ESRI.SilverlightViewer;component/Themes/PrintMapPage.xaml" />
<ResourceDictionary Source="/ESRI.SilverlightViewer;component/Themes/MapNavigator.xaml" />
<ResourceDictionary Source="/ESRI.SilverlightViewer;component/Themes/LargeBlueWave.xaml" />
</ResourceDictionary.MergedDictionaries>


文件夹Themes下的文件不存在@@@

我勒个去!




如果山不向我走来,我就向山走去!
原文地址:https://www.cnblogs.com/liangwei389/p/2287559.html