MVVM pattern example – split the bill

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


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.


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.


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 live online training, plus books, videos, and digital content from nearly 200 publishers.