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.
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!
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?
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!