Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Listview.FooterTemplate cause NullReferenceException bug

$
0
0
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="FooterTemplateTest.MainUI">

  <ListView  Footer = "Footer" Header = "Header">
    <ListView.FooterTemplate >
      <DataTemplate>
        <StackLayout>
          <Label Text="Test"/>
        </StackLayout>
      </DataTemplate>
    </ListView.FooterTemplate>
  </ListView>
</ContentPage>

If i start a project with this main page i get
NullReferenceException at Xamarin.Forms.Platform.iOS.ListViewRenderer.OnFooterMeasureInvalidated according to call stack.

If i change FooterTemplate to HeaderTemplate the project starts and i can see empty list with a "Test" header.
If i leave FooterTemplate but remove StackLayout leaving only Label the project starts and i can see empty list with a "Test" footer.

This happend both in 1.4.0 and 1.4.1 Pre2

As HeaderTemplate works fine I suspect it's a bug. Anyone know a way around this?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>