![]() I could generalize this with:Ĭount - RoundDown(Count / Wrap)*Wrap >= 1 & Count - RoundDown(Count / Wrap)*Wrap >= ColumnNumber, With 5 columns, that's 10, which leaves us with 3, so we assign 1 to the 1st 3 columns. ![]() With 4 columns, that's 12, which leaves us with 1, so we assign that 1 to the first column. So, in the first example, 13/4 rounded down is 3. In other words, I had to first divide the total count equally across the wrap count, then assign the remaining records 1 per each column. And with a total count of 13 and a wrap count of 5, the split up had to be 3, 3, 3, 2, 2. For example, with a total count of 13 and a wrap count of 4, I needed the split up to be 4, 3, 3, 3.I was basically desperately trying to figure out a mathematical representation of how the records should be split based on wrap count and the total number of records.I took out a notepad and pen, and started to write down how the records should be split for different combinations of total number of records and wrap counts. I then did something I had not done in a long time.In other words, I had to figure out the Items property for the flexible height gallery. The next challenge was to figure out how to split the pins across the flexible height galleries.So I the Items property of the blank vertical gallery to: It had to be equal to the wrap count as otherwise the gallery would have had more than one row (a vertical gallery with a wrap count of 4 which has 6 records to display, will show 4 in the 1st row and then 2 in the next row), which would have broken the UI I was trying to achieve. I then had to figure out the data source of the parent blank vertical gallery.In other words, how do I share the list across multiple flexible height galleries. Next challenge was to figure out how to display the list of pins/board items.This simply divides the width of the screen by 350 and then rounds it down to the nearest whole number. Keeping the width of the flexible height gallery fixed to 350, I set the wrap count of the blank vertical gallery to.First thing I had to do then was to control the wrap count of the blank vertical gallery based on the screen width as this app had to be responsive. ![]() A light bulb went off - I then decided to embed a flexible height gallery inside a blank vertical height one.So I needed a way to take advantage of it. Blank vertical height galleries do have a wrap count. ![]() I knew that to achieve the equivalent of having a wrap count property, I had to come up with a workaround.Since we know that in either case we will need a flexible height gallery, the first logical step was to use a flexible height gallery.How I made a flexible height gallery work Initial high level approach Because I honestly think that you can achieve anything with Power Apps. BUT, flexible height galleries in Power Apps do not have a wrap count property!!! Bummer right? That's what I thought but I didn't want to give up. That leaves us with only one option - to use a flexible height gallery with a variable wrap count. Having multiple flexible height galleries wouldn't be ideal as you cannot add more galleries if the number of galleries you want is more than the number of controls you have added on the screen. For those of you who don't know what wrap count is, it represents the number of columns in a vertical gallery and the number of rows in a horizontal gallery. Additionally, we would either need multiple flexible height galleries side-by-side OR a flexible height gallery with a variable wrap count. If you look at the Pinterest gallery, the first thing you would notice is that to achieve a UI like that in Power Apps, we will need a flexible height gallery. Gallery of pins/ideas on Pinterest Challenges with the design - gallery wrap count pins gallery in the Boards appĭoes this look familiar? I bet it does! Doesn't it look a lot like this? This is how it looks like:īoard items a.k.a. The biggest challenge with this app was to create the gallery of pins within a board. Selecting a board displays a gallery of its related board items or pins. These "pins", which are called board items in the app, can be categorized under different boards, which can, in turn, belong to different categories. One of the key features of this app is that it allows users to create "pins" of different types - links to Teams teams, channels, chats, websites, etc. Per the official Microsoft document (which can be found here), it "provides a simple way to connect and share with people in your organization with similar interests". Gallery of ideas on Pinterest Introductionīoards is one of the many sample apps that are available for users to download and use in Teams.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |