web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Red Color Fill on Sele...
Power Apps
Unanswered

Red Color Fill on Selecting the Image

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey! Guys. Hope you all are doing great. I am trying to Fill the surrounding of an image in red color whenever I will select it. Like in the images I have shared. You can see one without the color filling and one with the yellow color. So, how can I achieve it? Also, I want to fill the image surrounding with red color instead of yellow.

Capture2.PNG
Capture.PNG
Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @Anonymous from your screenshots, it looks like your images are inside two containers. 

     

    One method:

     

    On the OnSelect property of the left Image, use:

     

    UpdateContext({cxtVar_ImageFill_Left: true});
    UpdateContext({cxtVar_ImageFill_Right: false});
    

     

    On the Fill Property of the left Container, use:

     

    If(
     cxtVar_ImageFill_Left,
     Color.Red,
     Color.Transparent
    )

     

    On the OnSelect property of the right Image, use:

     

    UpdateContext({cxtVar_ImageFill_Left: false});
    UpdateContext({cxtVar_ImageFill_Right: true});

     

    On the Fill Property of the right Container, use:

     

    If(
     cxtVar_ImageFill_Right,
     Color.Red,
     Color.Transparent
    )
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    The thing is I don't have a container and for somehow the toggle and image is connected through a formula. So, is there a way to make it happen like that? The formula is attached in ScreenShots:

    Capture2.PNG
    Capture1.PNG
    Capture3.PNG
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Capture5.PNG
    Capture6.PNG
    Capture4.PNG
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @Anonymous when you say "somehow" - does that mean you did not create this app?

     

    Remember, I do not know your app. It is up to you to explain what those toggles are for and how it is relevant to the question you're asking.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I guess I have figured and used a rectangle as a back fill. Although, Thank You!

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @Anonymous - did you use the steps I provided or did you find your own solution? If it was my solution, please accept it as the solution.

     

    If you used your own solution, it would enrich the community forum if you could outline what you did to solve the problem. This way if future users come across this post they could reuse your solution.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard