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 / Auto Height Property i...
Power Apps
Answered

Auto Height Property is not Working properly for the controls inside the Gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Everyone, I have enabled auto height property on the labels used inside a gallery but the content is overlapping on one another.
Is there any way to control the height of gallery template so that the content looks proper?
Attached screenshots for reference

SetHeightlower.jpg
SetHeightHigher.jpg
Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-jagoud 

     

    Hello,

     

    If I understand you correctly.

     

    I think you need to put some code in the Y property of your labels

     

    For example:

     

    In label2 (the one under your first label, lets call it Label1) put this code in the Y property:

     

    Label1.Y + Label1.Height +5

     

    Replace "Label1" with your labels name

     

    cheers

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@

    Based on the issue that you mentioned, do you want to make the Label automatically adjust the row of the Gallery?

    I have a test on my side, please take a try as below.

    • Set the Label AutoHeight property: true
    • Find and copy the expression in the Y property of your needed Label
    • Put the copy result in Gallery TemplateSize property and do an addition:002.png003.png

    Best Regards,

    Qi

  • v-jagoud Profile Picture
    Microsoft Employee on at

    Hi @v-qiaqi-msft ,

     

    Thanks for the reply.
    I have updated the gallery template height to be dynamic as per your suggestion but, it doesn't seem to resolve the issue.
    attached screenshot

     

    Note: It looks like the only way is to increase the template height to accommodate the max length of the label(to accommodate the lengthy content) used inside the gallery but it would be the same for all the rows. attached screenshot 

     

     

    first.png
    second.png
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@

     

    ClearCollect(tem,{test1:"agagwerhgshfds"},{test1:"agagwerhgshfdshfgdjfgdjds"},{test1:"agagweasgsfdhfdshfdjhfgkjghlklrhgshfdshfgdjfgdjdshhhhhhhhggffgtyuikkhbvcdstjnbftunyuhgg"})

     

     

    RoundUp(Len(ThisItem.test1)/11,0)*36

     

    003.png

    Best Regards,

    Qi

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard