Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Another question about System.Exception: The component "componentname" does not have a resource identified by the URI "/"

$
0
0

I am getting exception 'The component "componentname" does not have a resource identified by the URI' in my sample WPF project.

Here is the scenario:

I have a WpfControlLibrary where I added one WPF UserControl.xaml.

That WpfControlLibrary referenced in WpfApplication(executing assembly).

In WpfApplication I added  a class Class.cs that is derived from UserControl. (public Class : UserControl)

When I try to instantiate a class

var class = Class();

I receive that exception.

On the another hand if I add a UserControl2.xaml to WpfApplication and

derive my Class.cs  from UserControl2 (public Class : UserControl2) it works fine.

if I add UserControl to UserControl2 it also works but it does not sutisfy our requirements.

We would like to create a WPF controls library and extend it in other projects.

Need a solution, if any, ASAP. Thanks.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>