I am trying to create a gallery with in a gallery and I want to control the template size of the parent gallery based on the number of records in the child gallery. See the above image.
I think this should be doable using a gallery size with a flexible template size.
I am having a hard time figuring out how to do this though. In each of the parent gallery names, you will see a number above the name which shows how many records are in the child gallery. I did that using this:
@ThatAPIGuy is on the right track: use a flexible-height (outer) gallery, and make the height of the inner gallery vary depending on the number of items. The gallery doesn't have an Auto-Height property, though, so we need to vary the height of the inner gallery ourselves.
Let's go over an example to see how this can be done (and you can then adapt it to your scenario). This will be the final look of the gallery:
To build it, add a button to initialize the collection with a nested collection; I'll use the example in the GroupBy function to do that. Set the button's OnSelect property to the expression below: