I have a series of WPF UserControls in a single Class Library. There are multiple levels to the controls and the top most level will use multiple lower level controls. Some of the low level controls import classes from other external DLLs and then use those classes in properties of the control. The problem is that when I try to drop one of those lower level controls into a higher level control they error when trying to render in the designer, stating that it cannot find the class assemblies used for the properties. They will, however work fine if dropped onto the main window of an executable and actually run perfectly in runtime mode, just not in the designer. Not the end of the world... but a royal pain.
As a quick example:
using MyClassLibrary;
public partial class MyControl : UserControl
{
public MyControl {}
public MyClass ClassInstance { get; set; }
}
The above code would render fine in the designer itself, just not when I try to use that control inside of another User control.
I also know the same problem can arise from external classes used in the constructor, OnLoaded, etc (anything that's run by the designer) but have already fixed those by checking if it's in Design mode and disabling that code from running. It's just that I cannot figure out how to have it not process the control properties.
Any ideas?