Vs2017:查找资源字典时发生错误 [英] Vs2017: An Error Occured while finding the resource dictionary

查看:116
本文介绍了Vs2017:查找资源字典时发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试引用资源字典我的app.xaml文件时出现以下错误

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>

错误

找到资源字典 pack:// application:,,, / Dashboard.Designer.WPF; Connection / Views / test.xaml时发生错误/ code>

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

参考图像

如何解决此问题。??

How to resolve this.??

推荐答案

您的资源文件包URI 错误。

它应该看起来像这样,包括组件部分:

It should look like this, including the component part:

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

这篇关于Vs2017:查找资源字典时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆