Inherited from WPF UserControl defined in different assemblies

I realize there are some old threads that discuss this, but I don't believe they still fit.

I have a WPF UserControl named TextControl. It has a XAML component and code-behind.

I want to extract a class called LookupTextControl from TextControl. It worked for me with LookupTextControl and TextControl, where in the same assembly. However, I have now split the TextControl into a separate assembly (DLL) and it no longer works. When I describe a new LookupTextControl instance and work through the constructor, it doesn't work when I call InitializeComponent in the TextControl class.

If I remove some of the XAML from the TextControl it works.

I understand that once upon a time you could not do this even in the same assembly. It looks like support was added within the same assembly, but not between assemblies.

Can anyone shed some light on why this is not working in my case and if there is an elegant way to store a Component XAML around it?

+3


source to share





All Articles