Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Silverlight TV 13: MVVM Light Toolkit
Mar 14, 2010 at 5:18 AMHi Ben,
I agree. I don't have any plans to change the way I'm doing it currently, but the only downside (that I can see) to instantiating the view model instances w/ MEF is that you lose design-time support in Blend.
This doesn't bother me personally, but some folks may like taking the approach of declaring the view model instance in their view's XAML, and setting the DataContext of the top-level container in the view to the view model (as Laurent does in this video)...so that it is Blend-friendly.
Ross
Silverlight TV 13: MVVM Light Toolkit
Mar 12, 2010 at 9:44 AMNice job Laurent and John.
I'm currently using MEF to 'import' my view model class instances. The advantage of this is that it keeps the instance hanging around in memory, so if I leave a page (view) and come back, I can restore the state of the page based on state that I've stored in the view model.
Is there any way to achieve this w/ your toolkit, or is such that if I leave a view and come back, the view model will be reinstantiated, and I will have lost all state information?
Thanks,
Ross