O'Reilly logo

Xamarin in Action: Creating native cross-platform mobile apps by Jim Bennett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Building cross-platform view models

This chapter covers

  • Creating simple and master/detail view models
  • Adding state to view models using single-value and collection properties
  • Adding behavior to view models when properties change and using commands
  • Communicating between components using messaging
  • View-model navigation

In the previous chapter we built the cross-platform model layers for our two apps, SquareRt and Countr. We looked at how you can wrap up your model layer in services and repositories that can be shared among different view models. Now it’s time to move up a layer and start coding the view models.

8.1. The view-model layer

Like the model layer, the view-model layer is a cross-platform layer (figure 8.1). The difference ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required