question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rendering of List View Header and Footer

See original GitHub issue

Reproduction: Set a View Element as header for a list view:

let view (model: Model) _ =
    View.ContentPage(
      content =
        View.ListView(
            model.Items |> List.map (fun item -> View.Label(text = item)),
            header = View.Label(text = "I am a header.")
        )
    )

This results in:

image

So it seems there’s a ToString() involved somewhere … Sample: FabulousListViewHeaderBug.zip

  • Fabulous 0.33.2
  • iOS + Android

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
TimLarivierecommented, May 16, 2019

I did see several mentions of this issue on Slack. We are indeed doing nothing to the value passed to Header/Footer and thus Xamarin.Forms is clueless about ViewElement and calls its ToString() method

I added a converter which will first call ViewElement.Create() before setting the properties Header/Footer

0reactions
aspnetdecommented, May 16, 2019

Makes sense! I’m closing this issue as the “fix” is coming and the workaround is available anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rendering of List View Header and Footer · Issue #407
Reproduction: Set a View Element as header for a list view: let view (model: Model) _ = View.ContentPage( content = View.ListView( model.
Read more >
Microsoft Lists formatting with header and footer settings
Review options for header and footer settings, for groups and entire ... -customization/ view -formatting • Repo - SharePoint List Formatting ...
Read more >
Header and Footer in Xamarin ListView (SfListView)
The SfListView allows to position the footer item by using the StickyFooterPosition property. The StickyFooterPosition property has two options: Body: The ...
Read more >
ListView Appearance - Xamarin
This article explains how to customize ListViews in Xamarin.Forms applications by using headers, footers, groups, and variable height cells.
Read more >
ListView Header and Footer not appearing
I have following listview within a content page. Data binds fine, but header and footer never appears. ... Even if I enable grouping...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found