This is a migrated thread and some comments may be shown as answers.

GroupHeaderTemplate is a fixed size on iOS

3 Answers 199 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 27 Apr 2017, 02:27 PM

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?

3 Answers, 1 is accepted

Sort by
0
Accepted
Rosy Topchiyska
Telerik team
answered on 02 May 2017, 03:24 PM
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
0
Ron
Top achievements
Rank 1
answered on 09 May 2017, 02:10 PM

Thank you Rosy! That worked perfectly!

 

Ron

0
Patrick
Top achievements
Rank 1
answered on 31 Jan 2019, 03:59 PM

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

 

Tags
ListView
Asked by
Ron
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Ron
Top achievements
Rank 1
Patrick
Top achievements
Rank 1
Share this question
or