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.

 

View solution in original post

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,903)