Search code examples
wpfcastle-windsorcastle

How do I display a user control registered by path in main window using Castle (WPF)


I have a WPF application with Castle design. In my main window project I perform registration on all of my other projects.

I would like to avoid referencing some projects which holds User Control and still display them in my main window.

So I am using the Register By Folder for now and I do not understand how the xaml of the main window can know these user controls if they are not referenced?

Please Advise

Adi.


Solution

  • If your main window project registers all components you will have to reference all of your control projects from it. If you want to avoid this you will need to have a bootstrap project.

    Check out how Krzysztof Koźmic uses DI, it might give you a few ideas.