A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
Perfect thanks team.
I still struggle to read the MSDN.
var list = JsonSerializer.Deserialize<List<Player>>(result);
var collectionView = new CollectionView();
collectionView.ItemsSource = list;
collectionView.SetBinding(ItemsView.ItemsSourceProperty, "Player");
I went with the above code, I'm not sure where on the MSDN this scenario is covered, I see loads of TValue options? What is TValue? I can't see, TValue, inside each other?
My second question is, this doesn't load all my players onto my page when I run it. In debug my list has all my players. What's wrong?
<CollectionView x:Name="collectionView">
<!--
<CollectionView.ItemsSource>
<x:Array Type="{x:Type model:Player}">
<model:Player PlayerFirstname="Test"/>
<model:Player PlayerFirstname="Test"/>
<model:Player PlayerFirstname="Test"/>
<model:Player PlayerFirstname="Test"/>
</x:Array>
</CollectionView.ItemsSource>
-->
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="model:Player">
<HorizontalStackLayout Padding="10" Spacing="10">
<Label Text="{Binding PlayerFirstname}" FontSize="22" />
</HorizontalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>