Im working with the ListView component and I would like to set categories which makes use of the Header within a ListView.
The content I have is a list of events that are happening today, tomorrow and the next day
How would I go about adding that to a list
My code so far is below
<ListView>
<ListView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Event 1 - Today</x:String>
<x:String>Event 2 - Today</x:String>
<x:String>Event 3 - Today</x:String>
<x:String>Event 4 - Today</x:String>
<x:String>Event 1 - Tomorrow</x:String>
<x:String>Event 2 - Tomorrow</x:String>
<x:String>Event 3 - Tomorrow</x:String>
</x:Array>
</ListView.ItemsSource>
<ListView.Header>
<Label Text="Today"/>
</ListView.Header>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Label Text="{Binding}" Style="{StaticResource listViewRacecourse}" />
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
I just have no clue how to get two values within the array, and then split them into two groups using ListView headers.
This is just a POC so I don't have a DB with all the content, hence not using a API or connection to a DB.
