Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Resize/Re-Orient the canvas in the component editor

(0) ShareShare
ReportReport
Posted on by 236

I am developing components which will be using in an app for Tablet/Laptop (a wider, landscape mode) only.

It seems that I can only select a canvas layout that has mobile (narrow, portrait) dimensions.

 

In the preview screen, I have tried to manually force the width by changing Width=Max(App.Width,App.MinScreenWidth) to 1366 and for Height=Max(App.Height, App.MinScreenHeight) to 800.

Then on the Component, I have added inputs for width and Height, then tried to set them  to App.Width and App.Height respectively, but the canvas and the component are both still component still remains at 640 x 1136.

 

I then tried setting the ComponentName.Object_Width and ComponentName.Object_Height to    Parent.Width/Height respectively.

But when my component is added to the Component PREVIEW screen, the dimensions are still 640 x 1136.

 

I would like to preview how my components work (in the component preview editor) before publishing in my app.

See my problem in image attached.

Component_Problem.png

 

  • narayan225 Profile Picture
    narayan225 2,390 on at
    Re: Resize/Re-Orient the canvas in the component editor

    @MissingLink 

     

    You can set the size of your component based on the app's width and height property. You can pass custom properties to the component if you need to set custom height/width property of the component controls.

    https://sharepains.com/2020/02/07/size-power-apps-components-the-right-way/

     

    Cheers!

  • MissingLink Profile Picture
    MissingLink 236 on at
    Re: Resize/Re-Orient the canvas in the component editor

    Thanks @narayan225 

    Unfortunately, the issue is not in the app, but in the COMPONENT library.  

    My components do showing correctly in the app, but when viewed in the component developer interface, ONLY the Mobile app size/orientation is available.

    So, if the sizes of my objects are not quite right, I only get to see this after publishing the component and importing it into the app.    I'd like to see how it work in the COMPONENT editor before I publish it for consumption in the app.

    Hope that clarifies my query?

  • narayan225 Profile Picture
    narayan225 2,390 on at
    Re: Resize/Re-Orient the canvas in the component editor

    @MissingLink 

     

    You should go to app settings and under Display check the resolution selected. This will show how the app's resolution. This will be where App.Height and App.Width are retrieved from.

     

    You are saying that you have manually changed the height and width of the app, I think you might have changed screen width and height.

     

    For your components to work, use ScreenName.Width and ScreenName.Height property.

     

    Cheers!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard