MVVM pattern example – split the bill

It's now time to develop our very first cross-platform library.

Idea

The idea is to make a library that allows us to write the total of the bill, the percentage of the total tip and the number of people, giving us the total per person.

Design

At a sketch level, we want a user interface that calculates the bill for each person, having as inputs the current bill, the percentage of tip and the number of people.

Development

Projects with MVVM in mind are normally structured with:

  • One shared "core" PCL project containing as much code as possible: models, view models, services, converters, and so on
  • One UI project per platform, each containing the bootstrap and view-specific code for that platform

We will start to develop ...

Get Xamarin 4 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.