views:

22

answers:

3

I have this other assembly which has a folder with 10 UserControls and I reference the assembly in XAML so I can use them.

xmlns:usercontrols="clr-namespace:Company.Project.OtherAssembly.UserControls;assembly=Company.Project.OtherAssembly"

However, when I try to use the UserControls with <usercontrols:someUserControl /> it only finds 4 of the 10 UserControls.

I have no idea why, they all have the same namespace. It even finds a public class within a UserControl but not the actual UserControl.

Any help on this matter is much appreciated.

+1  A: 

Do you mean that you do not see them in the IntelliSense ? Or it does not compile ?

This may be just that XAML editor in your VS does not treat some of your user controls well. IntelliSense in WPF is sometimes hard to understand.

Taras B
I don't see them in IntelliSense. I'll try and see what happens if I try adding something it doesn't find and compile.
Jova
I could just write them even if they did not show up and it would compile. Thanks.
Jova
good. With XAML/WPF it happens.
Taras B
A: 

IntelliSense for XAML relies on built assemblies. Try rebuilding the project with the controls.

Athari
A: 

If you don't see the UserControls in Intellisense, try to restart Visual Studio or rebuild the Solution.

Flagbug