How to Change the Color of the Selected item in Power Apps Gallery?

Recently, I was working on a project where I needed to highlight the background color of the Power Apps gallery selected item.

For example, if a user selects a specific item in the gallery, its background color should be displayed in a different color (like green, red, etc.).

Power Apps allows you to have great flexibility in changing the color of the selected item within the gallery.

In this Power Apps tutorial, I will tell you how to change the color of the selected item in Power Apps gallery.

How to Change the Color of the Selected item in Power Apps Gallery

Let’s take a simple scenario to work with this.

Example:

I have a SharePoint list [Power Platform Training] that has various columns like:

Column NameData type
User IDTitle
User NameSingle line of text
CourseChoice [“Power Apps,” “Power Automate,” “Power Bi,” “Power Virtual Agent”]
Course Start DateDate and time
How to change the color of the selected item in Power Apps gallery

I have created a Blank Canvas app from a SharePoint list and then added a Gallery control. Later, I displayed the gallery items using a SharePoint list.

Whenever the user selects an item from the gallery control, the selected item will display with a highlighted color “Beige“, as shown below:

Power Apps change the color of the gallery selected item

To work around the above example, follow the below steps. Such as:

  • Sign in to your Power Apps with your valid Microsoft 365 credentials.
  • Create a Blank canvas app -> Connect the Data source to a SharePoint list as shown below:
  • On the Power Apps screen, insert a Gallery control -> Set its Items property to:
'Power Platform Training'

Where,

  1. Power Platform Training = SharePoint list name
How to change the color of the gallery selected item in Power Apps
  • Select the Gallery control and set its TemplateFill property to:
If(
    ThisItem.IsSelected,
    Color.Beige,
    Color.LightGray
)
Change the color of the gallery selected item in Power Apps
  • Once the app is ready, SavePublish, and Preview the app. Whenever the user selects an item from the gallery control, the selected item will display the “Beige” or LightGray” color.
Power Apps gallery change the color of the selected item

This is how to change the color of the selected item of a Power Apps gallery.

Conclusion

I hope that you now understand how to change the selected item color in the Power Apps gallery control.

Also, you may like some more Power Apps articles: