I have started learning about Windows 8 Store Apps.
I recall from Silverlight and WPF programming earlier that people adapted the MVVM concept and now I am not sure if I should use what i learned back then or not.
I added a reference to the GalaSoft.MvvmLight and created a ViewModel and added it to my xaml as suggested by:
DataContext="{Binding Source={StaticResource Locator}, Path=Welcome}"
It looks like Microsoft included some kind of ModelView implementation in the LayoutAwarePage:
protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
{
// TODO: Assign a bindable collection of items to this.DefaultViewModel["Items"]
// DefaultViewModel["WelcomeTiles"] = WelcomeTiles;
}
which can be accessed if following datacontext have been set.
<DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}" />
So now I am unsure if I should create ModelViews as i remember them, by using MVVMLight or just add the data in code-behind files to the DefaultViewModel.
What are peoples experience with both? I have just started and my next goal is to add handlers for when a item is clicked in the GridView - which of the above paths will let do so in a easy way?