Tips for Use

Coordinator
Sep 1, 2010 at 10:38 PM
Edited Sep 2, 2010 at 4:11 PM

Here are some tips I have found helpful:

  1. It is usually easier to not use Include and Composition Attributes, instead use the Batching function withing the ContextManager
  2. For collections, typically you do not need to set a SelectedItem property in your ViewModel (use the PagedCollectionView's CurrentItem property instead).  The only time you do typically need a property to track selected item is when that selection triggers another action, such as refreshing a child item, or filtering another collection. (Although this could also be accomplished with the CurrentItemChanged event on the PagedCollectionView)
  3. Bindings:
    1. If you have common shared data (such as combobox values, lists of people, etc.) place all this in a viewmodel, which get added to your Application's resources
    2. All other data unique to your view, in ViewModels which are bound to your View
    3. Benefits of this approach: 1. Shared data can be retreived 1 time and shared by all views in your application. 2. Memory management is benefitted, since views you don't load are never loaded.