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 / How to center an image...
Power Apps
Answered

How to center an image on the right to the other image in code ?

(0) ShareShare
ReportReport
Posted on by 27

Dear community,

I want the picture with the envelop centered on the right of the image with the SampeImage. How can i do that?

PeKi1972_0-1707077252448.png

Gr p

Categories:
I have the same question (0)
  • Mitanshu Profile Picture
    1,658 Moderator on at

    Assuming

    control name for SampeImage is Img_SI and;

    control name for envelope is Icon_Envelope

     

    For Icon_Envelope; 

    Set Y property = Img_SI.Y + (Img_SI.Height)/2 - (Self.Height)/2

    Set X property = Img_SI.X + Img_SI.Width - (Self.Width)/2

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @PeKi1972 ,

    Assuming that is a Container you have those images inside, the Y of the envelope image would be

    Parent.Height/2 - Self.Height/2

    Also if you want it Right aligned the X would be

    Parent.Width - Self.Width

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • PeKi1972 Profile Picture
    27 on at

    I change my mind (oops). I have a container with 2 images:

    PeKi1972_0-1707079057386.png

    I would like the picture with the 3 dots equal aligned to the top with the picture SI. I guess it is the Y-axis.

    and 20 pixels the 3 dots must be from the SI. Is that possible. 

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    just have to set the vertical ellipsis icon y value to imageSI.Y and set its top padding to imageSI.PaddingTop and its x value to imageSI.X+ImageSI.Width+20

  • PeKi1972 Profile Picture
    27 on at

    Thanks that is perfect

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard