Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

fvasquez/xaml-advanced

Repository files navigation

xaml-advanced

This repo consists of artifacts from edX course DEV206.2x Designing Advanced Applications using XAML. The online course was designed and conducted by Microsoft and ended on January 20, 2016. The remainder of this README describes the last homework assignment I completed for the course.

Overview

Overview video

Homework 4

In this assignment, you will implement the MVVM pattern with your existing application.

Implementing a Base ViewModel

You will create a base ViewModel class that can be used as a common location for the data repository and INotifyPropertyChanged implementation. The implementation of this base class and the implementation of the factory for the data repository are all provided at the bottom of this unit. Your OrderViewModel and ExpediteViewModel classes will inherit from the base ViewModel class. The ExpeditePage will use the ExpediteViewModel as it's data context and a similar relationship will exist between the OrderPage and the OrderViewModel.

Instructions

  1. Implement a common ViewModel base class to replace the DataManager class
  • The implemenation for this base class is provided below
  1. Update the name of the OrderDataManager class to OrderViewModel
  2. Update the name of the ExpediteDataManager class to ExpediteViewModel
  3. Create a new Model project
  • Model classes (data representations) should exist only here
  • The main project should reference this project
  1. Create a new ViewModel project
  • ViewModel classes (behavior and logic) should exist only here
  • This project should reference the Model project
  • The main project should reference this project
  1. Update the list of Currently Selected Menu Items (OrderViewModel) to be of type ObservableCollection instead of List
  2. Add Command for adding Menu Items to the Currently Selected Menu Items list
  3. Add Command for submitting the Currently Selected Menu Items as a new Order to the data repository
  4. Validate that the project works as described in the Overview video