Hot Swap View Models: Monkey Business

Bogusław Błoński
2 min readNov 20, 2019

--

Hands on Collection View + Hot Reload + View Model Swap

Context:

Curiosity, lest’s checkout something more difficult.

Monkey Business

Copied and edited Collection View sample from @jamesmontemagno and some fun with it.

Source code:

Basic differences Preview VS Emulator

  • online resources not viable in Preview
  • Device specifics as Accent color, are different
  • Don’t forget about device settings
  • thing BAD XAML can look good in Previewer but not in Emulator and opposite

Online resources not viable in Preview

Previewer doesn’t show online data.

Device settings

Changing Font Size in device settings

Font Size in device settings Previewer VS Device

Collection View is null proof.

Here red square is null for properties as Image string and well as ItemSource swap to null doesn’t throw exception.

nulls in properties and ItemSource.

See:

Links:

https://devblogs.microsoft.com/xamarin/xamarin-forms-4-3-introducing-collectionview

--

--

Bogusław Błoński
Bogusław Błoński

Written by Bogusław Błoński

Did small internal corporate and big projects with over 1 000 000 active users in ASP.NET and XAMARIN.FORMS and XAMARIN.NATIVE. Blogging for better sleep.

No responses yet