GroupHeaderTemplate is a fixed size on iOS

4 posts, 1 answers
  1. Ron
    Ron avatar
    25 posts
    Member since:
    Jan 2017

    Posted 27 Apr 2017 Link to this post

    I would like to change the height of the GroupHeaderTemplate to match the content that I put in it. This works in Android. For example, if I have a Grid with a HeightRequest of 70, the GroupHeaderTemplate will be a height of 70 on Android. However, for iOS the height is fixed and will never change no matter how tall or short the content is.

    How can I change the height on iOS?

  2. Answer
    Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    586 posts

    Posted 02 May 2017 Link to this post

    Hi Ron,

    You can change the height of the listview group headers through the layout's GroupHeaderLength property. Please, let us know if you have further questions.

    Regards,
    Rosy Topchiyska
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Ron
    Ron avatar
    25 posts
    Member since:
    Jan 2017

    Posted 09 May 2017 in reply to Rosy Topchiyska Link to this post

    Thank you Rosy! That worked perfectly!

     

    Ron

  4. Patrick
    Patrick avatar
    12 posts
    Member since:
    Sep 2016

    Posted 31 Jan 2019 Link to this post

    It only works perfectly if (1) the heights of all headers are the same, (2) you can predict what that height is at design time, and (3) it doesn't change.

    On Android, the height of each individual header adjust to the size of its contents.  It needs to be the same on iOS.  There is a bug report on this, but it's pretty old and doesn't appear to have been fixed.  https://feedback.telerik.com/xamarin/1365964-listview-groupitemtemplate-does-not-respect-its-template-contents-in-ios-automatically

     

Back to Top