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 / Screen.Width is always...
Power Apps
Unanswered

Screen.Width is always 640

(0) ShareShare
ReportReport
Posted on by 2

Hi Guys,

 

I made an application with screen aspect ratio lock turned off. (https://powerapps.microsoft.com/hu-hu/tutorials/set-aspect-ratio-portrait-landscape/)

 

I tried to make a header image with the screen width and calculate the height, based on image original aspect ratio.

Image1.Width = Screen1.Width

Image1.Height = Round(Image1.Width * (Image1.OriginalHeight/Image1.OriginalWidth); 0)

Image1.CalculateOriginalDimensions = true

Image1.ImagePosition = ImagePosition.Fit

 

The image width is ok, it is as wide as the screen.

But, the Screen1.Width is always equal to 640, so the calculated height is always the same value.

 

If i put the Screen1.Width and Screen1.Height into textbox, it displays 640x1136 always (9:16). I have an Nexus5 phone, screen size: 1080x1776 (9.7:16).

 

Could someone help me?

 

Imre

Categories:
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi Imre,

     

    The default phone size for PowerApps is 640x1136. From the article you has provided, we know that If we unlock the aspect ratio, the app will adjust to the aspect ratio of the device on which it's running.

     

    On your Nexus5 phone how is the image displayed? Could you show me a screenshot?

     

    As I don’t have a Nexus5 phone, I test this issue on my iPhone6. I create the App on PowerApps studio according to your description, then I open it on my phone. The Screen1.Width and Screen1.Height value shown in the Textbox is the default size.

     

    Best regards,
    Mabel Mao

  • Pappi Profile Picture
    2 on at

    Hi,

     

    here is the screenshot from my phone.

     

    https://drive.google.com/open?id=0B2lxCcXD347yM2xyZG9tRVNRR1k

     

    my header image is the green box bordered with black line, the red color is the background of the image

    my expectation is: no red color is visible,

     

    if the width is 640 the height must be 1054 (becaue of aspect ratio of Nexus5)

     

    1136/1054 * 200 = 215.56

    So i tried to set 215.56 as height for image, and the result was i expected, no visible red background on Nexus5 (ofc the red background appeared on 9:16 screen now)

     

    so i think if i set 200, it is realy recalculated to 185.56, 215.56 recalculated to 200, which is the good height for image if the width is 640. This recalculating based on default screen height and the real height aspect ratio, and the screen width normaized to 640. 

     

    It would be good for me, if i know the aspect ratio of the current screen. 

    So, the topic name should change to "the Screen.Height is always 1136"

     

     

     

     

  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi Pappi,

     

    Thanks for your reply. It seems that this issue has been solved.

     

    If you have any other issues when using PowerApps, please feel free submit on this forum.

     

    Best regards,
    Mabel Mao

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard