Do you know how to center an app?
I created an app with PowerApps, and when I run it on the web or run the app in Teams, the pink area on the right is empty.
So I would like to know how to get the app to move to the center.
Hi @Bingqiling
By adjusting the width, height, and positioning properties of the main container or screen, you can center your app both horizontally and vertically within the app viewport. This ensures that your app content is visually centered and aligned, providing a better user experience.
There is an existing solution within the power apps community:
In addition, You can adjust the positioning and size properties of the main container or screen within your app. Here's how:
1. **Select the Main Container or Screen**: In the Power Apps studio, select the main container or screen that contains the elements of your app. This is typically the top-level container or the first screen in your app hierarchy.
2. **Adjust Width and Height**: In the properties pane on the right side of the screen, adjust the Width and Height properties of the selected container or screen. Set the Width to a value that is less than or equal to the width of the app viewport. Similarly, set the Height to a value that is less than or equal to the height of the app viewport.
3. **Center Horizontally**: To center the container or screen horizontally, set the X property to the formula: `(Parent.Width - ThisItem.Width) / 2`. This formula calculates the horizontal position of the container or screen relative to its parent container.
4. **Center Vertically**: To center the container or screen vertically, set the Y property to the formula: `(Parent.Height - ThisItem.Height) / 2`. This formula calculates the vertical position of the container or screen relative to its parent container.
5. **Test and Adjust**: Preview your app to see how it looks and adjust the width, height, and positioning properties as needed to achieve the desired centering effect.
If this post helps you, kindly give a Thumbs Up and if it solved your issue, Accept it as the solution to help the other members find it easily.
Thanks,
Robu1.
MS.Ragavendar
20
BCBuizer
10
Super User 2025 Season 1
LC-26081402-0
10