Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi guys,

After several hours of searching on Google, I can not find my answer. I hope you can help me out.
I want to make a factory which builds up the UI.
Among them: a TabControl with TabPages and controls. These are built up by metadata.

What is the best place for this logic for my MVVM project?
It is also possible in this manner to loosely couple the View and the ViewModel?

I assume that the View become completely built generically.

Thanks for reading and I hope there will be lots of comments :)
Posted
Comments
Sergey Alexandrovich Kryukov 24-Jun-15 13:02pm    
The question it too fuzzy to discuss seriously. One can guess on what you are trying to do, but not on what help you may need. "Best place for this logic" — what is it? what logic, exactly? and so on...
—SA
MrteR 25-Jun-15 3:18am    
Maybe you're right. The logic is actually a factory (class) which according to the metadata determines which controls (textbox, combo, label, etc.) must be placed on the view. Caliburn is for DI. There's 1 "Workspace" ViewModel and it's a conductor. The ViewModel which has to be opened is a screen and is placed in de center of the workspace. In this way you have some kind of MDI application. The factory's logic is in the ViewModel, is this correct? Or is there a better place to regulate this sort of thing?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900