There is no auto-height for the gallery itself - the height of the gallery control is fixed. However, you can use what we call a gallery with flexible height, where the template (that is replicated for all items) can have different heights. You need to create a gallery that has that property, once the gallery is added you cannot change whether it has a flexible height template or not.
To add one, choose the last option in the gallery menu in the Insert tab:
When you have that, you can add controls that have the AutoHeight property (text box, HTML Text) to the gallery template. The authoring tool will display the first row in the size of the template, and the subsequent rows in the size that it needs to accomodate the content.
Notice that when you preview the app (or publish and open it in a device, for example), you'll see all the columns in the correct size.
Hope this helps!
There is no auto-height for the gallery itself - the height of the gallery control is fixed. However, you can use what we call a gallery with flexible height, where the template (that is replicated for all items) can have different heights. You need to create a gallery that has that property, once the gallery is added you cannot change whether it has a flexible height template or not.
To add one, choose the last option in the gallery menu in the Insert tab:
When you have that, you can add controls that have the AutoHeight property (text box, HTML Text) to the gallery template. The authoring tool will display the first row in the size of the template, and the subsequent rows in the size that it needs to accomodate the content.
Notice that when you preview the app (or publish and open it in a device, for example), you'll see all the columns in the correct size.
Hope this helps!
I got auto-height galleries working using the following formula for the height of the Gallery -
CountRows(MyGallery)*GalleryCellHeight
GalleryItemHeight is the height of each cell within the Gallery. If you want to grow a container that the gallery is sitting within then you must also set that containers height to the same formula.
Here is the solution:
1. Use custom gallery - Flexible Height
2. Use following expression for control's height - Len(ThisItem.Column)/N
a. N - Try different denominators to set the height
Anonymous FTW, with one tweak:
CountRows(MyGallery.AllItems)*GalleryItemHeight
User | Count |
---|---|
252 | |
126 | |
104 | |
50 | |
50 |