Thursday, May 02, 2013

N=7 - adding some refinements to Books (N+1 days of MvvmCross)

Today, I thought I'd try adding some finesse to yesterday's Books sample.

It didn't entirely go to plan... I did hit some bugs along the way.

However, overall I got there in the end :)

Among the things this N+1 shows are:

  • Adding some System.Threading.Timer functionality to the ViewModel - to provide dampening to the network query rate (during typing)
  • Adding an IsLoading indicator to the ViewModel - so that I could show an IsLoading UI indicator (e.g. a spinner)
  • Adding and using the Visibility plugin
  • Adding a custom InverseBool ValueConverter
  • A quick intro to adb - the Android Debug Bridge
  • Adding the coding4fun NuGet package to help change WindowsPhone TextBox behaviour
  • Fighting with Xamarin.iOS to get it to update the executable in the simulator
  • Fixing bugs in lock(object) - sorry - should have spotted this bug quicker!

For this video to make sense, you may need to first watch the videos from:

The code for today is at:

This code in GtiHub also includes the UI updates for the WindowsStore sample too - I didn't do these during the video as I'd already talked too long... Most of the WindowsStore changes use the same techniques as I used in WindowsPhone. The only exception was that in order to get real time updates from the textbox I had to pull in - this also required lots of Reactive NuGet packages too.

The video is at:

That's all for now :)

If you've got special requests for future N+1's then let me know! Or if you want to contribute your own...

Previously in N+1:


  1. Hi Stuart,

    Thanks for the fantastic series. Regardging what can be added to the future N+1 sessions:

    1. Examples of inter-view communication similar to what Greg did: I believe this is a very common challenge for many applications.

    2. Example of reusing view models when views don't have one-to-one mapping between different platforms. E.g. Windows Store has larger screen size that can fit more details, and Windows Phone may need two split these details to two views.

    Best regards

  2. Hi! MvvmCross is awesome and I have learnt a lot so far this week.

    In attempting my first real-world application, however, I have come across my first hurdle: Database persistence.

    I see that you have a SQLite plugin on github. Will you be doing an N+1 on SQLite access and also providing the SQLite plugin on NuGet?

    That would be truly awesome!

    Thanks again for the work!


    1. Thanks... I'll do more blog posts & videos soon - but you guys can too :) - post links to your posts and I'll promote them

    2. Also, one sample for data persistence is coming as soon as the evolve videos are out - due any day now :)

    3. Videos coming soon to