Ross Wozniak

Ross Wozniak rwozniak Ross Wozniak

Niner since 2009


  • Silverlight TV 13: MVVM Light Toolkit

    Hi 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) that it is Blend-friendly.



  • Silverlight TV 13: MVVM Light Toolkit

    Nice 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?