I have a viewmodel with an observablecollection of Kanban cards bound to my kanban control. I'm using a templateselector to decide which custom template to display in each column. When I load the observablecollection with cards in the contructor of the viewmodel, it works great. However, when I load the observable collection with cards from an async method within the viewmodel, I get the LoadTemplate error. It doesn't even get far enough to call the OnSelectTemplate method of the templateselector. When I change from using a templateselector and bind to specific template, it works.
So how can I use a templateselector and load the data after viewmodel initialization?
Sample of template
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:converters="clr-namespace:Wibci.Xamarin.Forms.Converters;assembly=Wibci.Xamarin.Forms.Converters"
mc:Ignorable="d"
x:Name="Card"
x:Class="Xam1.Features.Home.Templates.PendingCard">
<Frame Padding="10" HasShadow="true" BackgroundColor="White" CornerRadius="0" >
<Label Text="Howdy" />
</Frame>
</ViewCell>