tags:

views:

54

answers:

1

Some body can share with me some example that use MVVM Light, where one view exists in each project (the solution has multiple projects, one for each view). What happen with the Locator, need to have one for each view in each project? How sincronize the view? How animate the initializacion of each view?.

Thanks a lot

A: 

Why does each project only have one view? That seems inefficient, unless you're dynamically loading the XAPs of the other projects at run time. If that's the case, there would still be one main Silverlight project as a starting point, and that's where the ViewModelLocator should be.

I would need more information about the structure of the project and the business goals before being able to provide more details.

Matt Casto
ok, I have a solution based on win forms, many forms, usercontrol, all encapsulated into atomized project, i have 128 projects in total. This is because this model is easy of maintain and deliver to end users. Then, my idea is to migrate this big solution to WPF model, I am looking for a framework or model to build my new solution. I am evaluating and understanding the mvvm and the light tool kit,but have many interrogants. I think than any user control that i need can be encapsulated into a project, for example:
Roberto
i need a point of sell (1 project), a search control (another project), a listing control (another project), etc. The main project has a ViewModel, Locator, and UI. Then i like charge all the other projects (one each time user need it) into the main proyect in a content control especific area.I think that each project will contain its own viewmodel, ui and locator, but how sincronize the charge of all other userscontrols. i need animation too.I hope you understand me.
Roberto
I still don't understand why you need separate projects for each control. Are these optional modules? If so, look at MEF to load them. Either way, I don't think you'll need ViewModelLocators in each project.
Matt Casto