I have following listview within a content page. Data binds fine, but header and footer never appears.
<?xml version="1.0" encoding="UTF-8" ?>
<ContentPage.Content>
<SearchBar x:Name="SearchFor"
Placeholder="search for"
Text="{Binding Path=SearchText}"
TextChanged="OnValueChanged"
SearchButtonPressed="OnSearch" />
<ListView x:Name="listView" ItemSelected="OnItemSelected" ItemsSource="{Binding Item}"
Header="{Binding ItemID}"
Footer="{Binding SupplierItemDesc}">
<ListView.HeaderTemplate >
<DataTemplate>
<StackLayout Orientation="Horizontal"
Padding="10,5,5,10"
BackgroundColor="Yellow">
<Label Text="~~"/>
<Label Text="{Binding .}"/>
<Label Text="~~"/>
</StackLayout>
</DataTemplate>
</ListView.HeaderTemplate>
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding RetailCurrencyCode}" Detail="{Binding RetailValue}"></TextCell>
</DataTemplate>
</ListView.ItemTemplate>
</ContentPage.Content>
Even if I enable grouping template, it just won't show anything.
Wrap your DataTemplate in a ViewCell and give it a height: