Hot Swap View Models: Monkey Business
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
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.
See:
Links:
https://devblogs.microsoft.com/xamarin/xamarin-forms-4-3-introducing-collectionview