Implementing Model-View-ViewModel in Silverlight

Join Tim Heuer and Craig Shoemaker to learn to build a simple quiz application using Model-View-ViewModel in Silverlight.

Download code sample: mvvm-sl.zip

Duration: 1 hour

Download

  • Full: 1024x768, 181MB
  • Web: 640x480, 168MB
  • Mobile: 320x240, 90MB
Anonymous
Parents
No Data
Comment
  • @rubans: Button click code is trying to set data to ViewModel instead of ViewModel.Questions. Changed as below to get it working.

           private void Button_Click(object sender, RoutedEventArgs e)

           {

               //var data = this.DataContext as QuestionViewModel;

               //data.SubmitAnswers();

               QuestionViewModel vminst = new QuestionViewModel();

               vminst.Questions = this.DataContext as ObservableCollection<PMPSample.Model.Question>;

               vminst.SubmitAnswers();

           }

Children
No Data