A
A
Aleksej2016-03-23 11:34:26
WPF
Aleksej, 2016-03-23 11:34:26

How to distribute resources/styles in a composite WPF application?

Problem/Problem: I have a composite (modular) WPF application using the Unity IoC container, without using any frameworks like Prism.
There are three levels of modules:
- top, does not depend on anyone, contains infrastructure and interfaces.
- medium, modules loaded into the shell. Only the upper level is referenced.
- lower, represent a shell and a starting point. Referencing infrastructure and modules.
I would like to have all the styles and other resources centrally somewhere, and so that Visual Studio can display them in the designer.
Now all styles are at the lowest level in ResourceDictionary App.xaml, in modules they are used as StaticResource, everything works and is displayed at startup, but the VS designer does not find and does not display such resources.
question: Where and what can / should be configured so that the VS designer correctly displays styles?
P.S. found a generic solution using Prism with the same three levels. In VS, everything is displayed as it should (although in the XAML editor, the studio swears at an unfound name).
Additional question: does Prism use some kind of crutches, or can something be configured somewhere?
(VisualStudio 2012, Update3)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question