How do I centre a pop-up in powerapps ?
In the Edit mode I can easily centre the pop up but when I engage the View mode it doesn't align right.
It will probably be something with the X and Y and calculating the centre of the screen but I'm not sure
Solved! Go to Solution.
Those are correct - I just did one here with
X of (Parent.Width - Self.Width)/2
Y of (Parent.Height - Self.Height)/2
and it is certainly centered properly.
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.
Visit my blog Practical Power Apps
Hi @RvdHeijden ,
Yes - it is pure mathematics (not coding).
For X, (screen height - popup height) / 2.
For Y (screen width -pop-up 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 the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
@WarrenBelz then I think I'm doing something wrong because your solution sounds logical but it still doesn't align right. The formula I'm using is:
X=(Parent.Height-596)/2
Y=(Parent.Width-1125)/2
Now it aligns a little to the left and to the bottom
Those are correct - I just did one here with
X of (Parent.Width - Self.Width)/2
Y of (Parent.Height - Self.Height)/2
and it is certainly centered properly.
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.
Visit my blog Practical Power Apps
@WarrenBelz I found the problem and it was my mistake 🙂 . As you can see in my reply I've flipped the X and Y
X=Height and Y=Width but it should be X=Width and Y=Height
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
182 | |
47 | |
46 | |
34 | |
33 |
User | Count |
---|---|
260 | |
87 | |
79 | |
68 | |
67 |