Microsoft Power Apps

Size your Power Apps with Height and Width in SharePoint webparts

Sizing you apps in Power Apps isn’t any more complicated than setting the height and the width of the app. But tday I came across a situation where I needed a banner shaped app.

Banner image

So I created a Power App and added an image control that shows my banner.

If I was to add this to a sharePoint page then I would end up with a lot of unused space on my page.

So how do we resize the app so that we don’t have the white space appear. One important factor here is that my image control is only 100px high!

Resize the app

Reszing the app is easy, although…

After selecting Custom as a size, I can change the size of the the app

I’m going to set this to 120.

No this post isn’t just about resizing the app. That would be a bit too simple.

The various Heights and Widths of an app

There is another setting important here. But before I look at that I will have a look at the various height and width properties.

We have 3 properties that are important.

  • App.Height – This is the height that we set earlier
  • Screen.Height
  • App.MinScreenHeight – This is set to 320 by default

Ok, this is slightly weird, We and an app that is 120 high and a screen that is 320 high.

When we look at the screen’s height property we quite quickly can find out the issue.

The height of a screen is set to Max(App.Height, App.MinScreenHeight). In my case this means that the minimum height of the screen, creates screens that are higher than my app.

Settings the App.MinScreenHeight to the height of my app resolves my issue of making the app appear with an height of 100 on my SharePoint page.

Share
Pieter Veenstra

Business Applications Microsoft MVP working as a Principal Architect at HybrIT Services Ltd. You can contact me using contact@sharepains.com

Recent Posts

1 Step to create the REPT function in Power Automate

Today I was asked on the chat about how to create a REPT function in…

2 weeks ago

4 avoidable pitfalls of Low Code development?

Low Code Development is all about anybody can do it! But what are the pitfalls…

4 weeks ago

Implement booking availability in Power Apps in less than 5 minutes

Today I was asked how to implement a booking availability solution in Power Apps. The…

3 months ago

Delegation with SharePoint lists Power Apps vs Power Automate

We all know about delegation warnings in Power Apps, but how about delegation with SharePoint…

3 months ago

Timing issues in relation to App OnStart, Screen OnVisible, Timers and user interruptions in Power Apps

When you create apps, it is important to understand the timing issues that may happen.…

3 months ago

Implement a PDF preview in a Model Driven Apps

Recently I needed to implement a PDF preview in a Model Driven App. This should…

3 months ago