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 / A fix for autoheight i...
Power Apps
Answered

A fix for autoheight issues in improved rendering mode

(2) ShareShare
ReportReport
Posted on by 471

Given the performance issues caused in my app by Improved Rendering Mode, I set about a big UI overhaul.

 

In the process I've just discovered a fix for the unpredictable behaviour of autoheight on labels. First of all, the symptoms occur when you're using both autoheight=true and have a condition for visibility. I expect it's a matter of render timing - but regardless, the fix is to also make your autoheight conditional, instead of just true. The easiest way to do that is to use the same code as your 'visible' condition in your autoheight.

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I love this idea, but PowerApps isn't allowing me to change the AutoHeight property of my labels? I can neither change the AutoHeight property to label.Visible or the code I use to toggle visibility, If(tog.Value=true,false,true). As soon as a change the property and switch away it reverts to either true or false.

  • dinusc Profile Picture
    Microsoft Employee on at

    Please note that we've identified and fixed an issue with the autoheight label when it is nested 2 levels deep in a container that has "visibility" formulas. For example, a label that is added to a flexible height gallery, which is added to another flexible height gallery that has a formula assigned to its "Visible" property.  Following the normal release schedule, the fix should be publicly available on the week November 12th.

     

  • davidstone Profile Picture
    471 on at

    Sounds great! Will this effect labels just one level deep? In my case the issue you've described a fix for actually occurs within just a single gallery with conditional visibility on a label - no nesting required.

  • Verified answer
    dinusc Profile Picture
    Microsoft Employee on at

    Hello @davidstone,

    The fix is not strictly related to the nested level, but we could never reproduce this issue with just one level deep. Can you confirm that your gallery is on the regular screen and not a part of the scrollable screen or card? If so then I would appreciate some instructions on how to reproduce this in a new app.

    Thank you,

  • davidstone Profile Picture
    471 on at

    I've got another fix for this - since the previous fix hasn't worked consistently for me.

     

    Instead of having conditional visibility on my label (which, whether directly causative or not, makes the symptom occur), I have a condition on the x position. So instead of hiding the field, I simply position it to a negative x value which is off screen. Same result, but now the field properly displays at the right height.

     

    And with that, I have decided to finally switch to Improved Rendering!!

  • davidstone Profile Picture
    471 on at

    Hi @dinusc,

    To re-create my issue:-

    • Ordinary gallery on a freh page
    • Connect to some data with a couple of text fields, one of them long but not rich (I'm using an SP list)
    • Place a button into a gallery row, and have it collect the ID of the current item when it is clicked
    • Set your templatesize to 0 (it will then grow in height to whatever contents are visible
    • Place a label connected to the longer text value, but position the label below your button
    • Change the visible property of the label to show only if the ID of the current item is in the collection you created
    • Set the autoheight to true on the label
    • Now run the app, or use Alt - the symptoms are the same either way
    • You should see that each gallery item is only as tall as the button, but when you click the button, that item should expand to reveal the newly visible label - however the label is only around 3 pixels tall

     

    I don't know, but I would guess this is something to do with the timing of the height calculation vs when the conditional visibility is displayed? I further suspect this because in another app I was able to set the height property of a field to a context variable, then use a timer to alter the context variable, after which the correct autoheight was calculated after the visibility.

  • davidstone Profile Picture
    471 on at

    Some of those steps aren't strictly necessary, such as collecting the ID of the item clicked. I'm only doing that because in my app you can 'expand' multiple rows.

  • Maverick101 Profile Picture
    33 on at

    I tried this and a couple other suggestions, but what worked for me was this:

    1. Create new label outside of the gallery. 
      • Label settings:
        • text: (your gallery).selected.(your text field)
        • visibility is true, but make sure you select the label options on the left pane > reorder > send to back (to essentially hide this)
        • Auto height = true
    2. Now on the label you want to fix the auto height issue with, change the following:
      • Auto height = false
      • height = (the new label mentioned above).height

     

  • Murillo-Mariano Profile Picture
    on at

    It's working for me, i used the same formula of the visibility in autoheight and worked.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 476

#2
WarrenBelz Profile Picture

WarrenBelz 365 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 339

Last 30 days Overall leaderboard