Xamarin Forms Collection View Multi-Selection Binding

I spent a few too many hours fiddling with Xamarin Form’s collection view and multi-selection binding. That was somewhat frustrating so I’m writing a little about it in the hopes that you don’t have to deal with the same. If you have a view like this: and a View Model like this: You’d expect the binding to work, right? No problems. Well, no. It doesn’t. The CollectionView will only bind SelectedItems to collections of object....

November 1, 2020 · 1 min · LPains

FreshMVVM master/detail page lazy loaded

Out of the box, FreshMVVM offers a Master/Detail page navigation container that works nicely. However, it does not support lazy loading the pages as you navigate to them. Below, I demonstrate how I’ve done it. We need to replace the FreshMVVM original implementation of FreshMasterDetailNavigationContainer. Note that the implementation below is mostly a copy with the following changes: The list view is grouped Each item in the list can have an icon In the AddPage methods, we no longer create an instance of the pages added, we just add a light reference to a collection The menu page is a xaml file instead of fully created in code Only when the menu item is tapped we instantiate and display the Page and ViewModel LazyLoadedPage class:...

July 29, 2018 · 1 min · LPains