cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SamGibbs
Helper III
Helper III

Dyanmic height of gallery

Is there a method to dynamically set the height of a flexible height gallery? I have used flexible height as the individual items are varying sizes, but the gallery is embedded into a canvas and I wanted to avoid having seperate scroll bars for both the canvas and the gallery.

1 ACCEPTED SOLUTION

Accepted Solutions

a26.jpg

This is Template Size.

Let's say you have 10 records in gallery and your template size is 100.

CountRows(Gallery1.AllItems)*TemplateSize

This code will set your gallery height to 1000 dynamically.

 

View solution in original post

4 REPLIES 4
zmansuri
Super User
Super User

Then in gallery height property write:

CountRows(Gallery1.AllItems)*TemplateSize

 

Not sure if it this works.

Hi - thanks for responding. PowerApps doesn't seem to recognise TemplateSize. Any ideas?

a26.jpg

This is Template Size.

Let's say you have 10 records in gallery and your template size is 100.

CountRows(Gallery1.AllItems)*TemplateSize

This code will set your gallery height to 1000 dynamically.

 

SamGibbs
Helper III
Helper III

Hi - thanks for the clarification. In the end it needed the gallery to be reidentified for template size so CountRows(Gallery1.AllItems)*Gallery1.TemplateSize

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,862)