0
votes

m trying understand a MVVM pattern with MVVM Light Toolkit in Universal App. I've some question about this pattern.

  1. Should I write Views for Windows Phone and Windows separately or just one view in Shared project ?
  2. Should I use code behind only in Shared Project ?
1

1 Answers

1
votes
  1. It depends on the requirements of the screen, if the views are different in windows phone and windows than write them in separately and share common resources between than using shared project resources. And if both are same then use shared project(which is rather sort of shared folder b/w both projects)

  2. All the business logic of the view and handling of the view should go to ViewModel. Thing that cannot be done properly in ViewModel should go to view code behind like starting and stopping of the story board etc.