为什么我得到组件'XXX'没有URI'Xaml Path'标识的资源 [英] Why I am getting The component 'XXX' does not have a resource identified by the URI 'Xaml Path'
问题描述
Hi Team,
我不知道为什么我在加载MainWindow.xaml时遇到异常。
I have no idea why I am getting below exception while loading MainWindow.xaml.
请在下面找到类和库的结构 -
Please find below structure of classes and libraries -
1。实用程序库 - 包含一个UserControl,称为" MyUserControl "。
1. Utility library - Contains a UserControl which is called as "MyUserControl".
2。附件库 - 包含" 实用程序 "的引用图书馆。在附件库中,我创建了以下类 -
2.1 - MasterUsercontrol Normal Class - 继承自"MyUserControl"。
2.1 - MasterUsercontrol Normal Class - Which is inherited from "MyUserControl".
2.2 - MainWindow.Xaml - Where" MasterUsercontrol"在Xaml文件中使用。
2.2 - MainWindow.Xaml - Where "MasterUsercontrol" is used in Xaml file.
当我运行应用程序时,我遇到了错误。
请帮忙。
推荐答案
Hi Team,
我正在使用另一个dll中的一个用户控件。在使用时,我面临以下问题 -
$
1.我有一个名为"CustomControls"的程序集。我在其中创建了一个名为"ucAttachment.xaml"的用户控件。
$
2.我有第二个程序集叫做"UILibrary"。在哪里我添加了"CustomControls"的引用。我添加了一个名为"AttachmentUtils"的普通类。它继承自"ucAttachment.xaml"。
$
我正在使用"AttachmentUtils"在一个xaml中。当对象初始化发生时,我得到异常,因为"组件'AttachmentUtils'没有由URI'/CustomControls ;component/attachments/ucAttachment.xaml'标识的资源。"
Hi Team,
I am using one user control from another dll. While using, I am facing below issue as -
1. I have assembly called "CustomControls" in which I have created one user control named as "ucAttachment.xaml".
2. I have second assembly called "UILibrary" where I have added reference of "CustomControls". I have added one normal class called "AttachmentUtils" which is inherited from "ucAttachment.xaml".
I am using "AttachmentUtils" in one of xaml. When object initialization take place, I am getting exception as "The component 'AttachmentUtils' does not have a resource identified by the URI '/CustomControls;component/attachments/ucAttachment.xaml'."
请帮我解决上述问题。
谢谢,
这篇关于为什么我得到组件'XXX'没有URI'Xaml Path'标识的资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!