How to build a curved gallery in Power Apps
tl;dr
Galleries in Power Apps do not have to look boring. With a little creativity we can create a curve effect.
gallery
- Upload a few images
- Add a horizontal gallery
gal
- Set the ShowScrollbar property to
false
- Set its items property to
Table(
{
id: 1,
image: 'image1',
title: "image1"
},
{
id: 2,
image: 'image2',
title: "image2"
},
{
id: 3,
image: 'image3',
title: "image3"
},
{
id: 4,
image: 'image4',
title: "image4"
},
{
id: 5,
image: 'image5',
title: "image5"
},
{
id: 6,
image: 'image6',
title: "image6"
},
{
id: 7,
image: 'image7',
title: "image7"
},
{
id: 8,
image: 'image8',
title: "title8"
}
)
- Add an image
img
to the gallery, set its Image property toThisItem.image
- Add a button to the gallery, (I liked it to be semi transparent) and set its X to
img.X
and its Width* toimg.Width
- Set its Text property to
ThisItem.title
ovals
- Add two ovals to your screen, set their Width to
gal.Width
, set their Y property that the ovals slightly overlap with the gallery (depending on how intense you want the curve effect to look like) - Set the Fill property to
Screen1.Fill
and their BorderColor toTransparent
- voila, they seem to be invisible
slider
As we don’t show a scrollbar (I find the built-in scrollbar ugly), we will add a slider with which we can scroll through our gallery
- Add a horizontal slider
- Place it on top of the gallery, matching its size
- Set the HandleSize to
gal.TemplateHeight
- Set its Min to
(gal.TemplateWidth*CountRows(gal.AllItems)-gal.Width-gal.TemplateWidth)*-1
, its Max togal.Width-gal.TemplateWidth
, and its Default toSelf.Max
- Now set all color values to
Transparent
- we want to make the slider disappear. Don’t set the visible property tofalse
- users can’t interact then with the control anymore
One last thing: Set the X property of the image in the gallery to slider.Value
That’s it!
Feedback and what’s next?
I’d like to know what you would like to display in such a curved gallery? Preview of documents? Images of assets? Also: did you know that you could use a slider to scroll through a gallery? Let me know on twitter! If you found this blog post useful, please also subscribe to my newsletter - news coming about every 2 months, I promise to not spam you!
Published on:
Learn moreRelated posts
The Benefits of Hiring a Power Apps Consultant for your Business
Introduction Franklin D. Roosevelt once said, ‘The only limit to our realization of tomorrow will be our doubts of today.’… ...
Generating Power Fx Formulas with Multi-Language Comment Support in Power Apps Using Copilot
The Comment-Generated Formulas feature in Power Apps lets you create Power Fx formulas directly from code comments. By typing `//` or ‘/*’ fol...
Field suggestions by Copilot –Power Apps (Dataverse)
Field Suggestions by Copilot for Canvas Apps apply to Gallery, Form Table controls both classic and modern for Dataverse, SharePoint, or SQL S...
A Guide for Power Apps Integration with SharePoint
Introduction Many companies are leveraging Power Apps and SharePoint integration which enables them to develop responsive, low-code applicatio...
Mock Power Apps connectors in tests with Playwright
Power Apps connectors allow you to connect your app to external services like SharePoint, Microsoft 365, or custom APIs. When you build a Powe...
How Can I Still Find Classic Themes in 2024 for Power Apps and Dynamics 365?
As part of the 2024 Power Platform Release Wave 1, Microsoft have moved the classic Advanced Settings menu over to the new Power Platform Envi...
Executing SQL Server stored procedures with Power FX in Power Apps
A stored procedure in SQL is a pre-defined collection of SQL commands stored within the database, optimized to enhance execution efficiency an...
What’s new in Power Apps: October 2024 Feature Update
AI-powered Development See highlights of what’s new this month on Power Apps Pulse! We’ve got some great enhancements to share this month! It’...