web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Flexible height galler...
Power Apps
Unanswered

Flexible height gallery not adjusting height consistently

(1) ShareShare
ReportReport
Posted on by 1,393

I have a flexible height gallery where the TemplateSize is set based on the position and height of a particular label. In the image below, the label to the right of "Details" (named "val_Details") has auto-height enabled, and the TemplateSize is set to "val_Details.Y + val_Details.Height + 10". In the first item, that label is less than a full row, so it's fine. In the second, you can see the top edge of the text on the second row, and in the third, it's properly sized. This pattern seems to be somewhat consistent (ie: the first and maybe second entry that should auto-size don't, but subsequent entries do. The rounded rectangle (a button in view mode) that serves as the background image for each cell has its height set by almost the same formula (except it's "+ 5" at the end). Originally, I was setting the templatesize on the height of that button plus 5 pixels, but the behavior was exactly the same. I thought it was the "second hand" nature of the sizing that was the issue, but apparently not. I've done this before in other apps without this problem, so I'm not sure what the problem is here.

 

ChadVKealey_0-1607368026251.png

 

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @ChadVKealey 

    If you try it where the val_Details is done same way as the first one you mentioned instead of the automatic height, does the issue persist anyway?

     

    Yes, it means things that are one line will have a bit too much space after it even if it works - however as troubleshooting step, does at least doing this way work, or does it still present similar or other issues if you try that?

  • ChadVKealey Profile Picture
    1,393 on at

    Actually, I believe I found the issue. When I created the gallery, I selected the "social feed" template (as opposed to "blank") and basically repurposed the fields included in that template. When I recreated the gallery from the blank template, it seems to work as expected. I'm not sure what special properties those fields have that would prevent the auto sizing from working, but since the problem hasn't returned, I assume that was it. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard