Vs2017: An Error Occured while finding the resource dictionary

余生颓废 提交于 2019-12-21 05:39:04

问题


Am getting the below error when i tried to refer the resource dictionary my app.xaml file

<Application x:Class="DesignerPoc.App"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:local="clr-namespace:DesignerPoc"
         StartupUri="MainWindow.xaml">
<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/Dashboard.Designer.WPF;Connection/Views/test.xaml"/>
          </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
 </Application.Resources>

Error

An Error occurred while finding the resource dictionary "pack://application:,,,/Dashboard.Designer.WPF;Connection/Views/test.xaml"

refer the image

How to resolve this.??


回答1:


Your Resource File Pack URI is wrong.

It should look like this, including the component part:

pack://application:,,,/Dashboard.Designer.WPF;component/Connection/Views/test.xaml


来源:https://stackoverflow.com/questions/45048632/vs2017-an-error-occured-while-finding-the-resource-dictionary

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!