Showing results for 
Search instead for 
Did you mean: 
New Member

Size of canvas app on a form(too long)


I have canvas app with custom size(W300xH100), but when i add this app on a form it ALWAYS is too long(picture attached). I want it to end on the green line(where ends my canvas) but it always is stretched down(red line). I played with all places where you can change size(app, screen) but no dice.... Can this be done? I tried all this settings ;scale to fit','ascpect ratio','orientation' etc.

Super User
Super User

To my knowledge the embedded Canvas App's height cannot be changed. This width and height does resize with the browser window automatically. However, to cut off the embedded app at the height you want is probably not possible or supported. It is recommended you leave this entire area in middle of the page available for the app and not put something else below this part.


In most use cases, the whole area is needed. 


I am not sure there is any out of the box way to cut off the embedded canvas app display in the specific way you want. If there is an out of the box way, I would be glad to know of it as well, but I do not think there is one.


You can also try the below, but warning that it is probably unsupported functionality, it may break something in the future, and great caution should be used before attempting - and it should be tested in a development environment first if possible:


If you really absolutely must cut it off by force in the specific way you want, it may be possible by looking for the element with class= "customControl MscrmControls Canvas.CanvasControl MscrmControls.Canvas.CanvasControl" - looking for the node one level below that, and setting the style height to something like "100px !important". You can try to use some kind of custom JS web resource to force this style to apply to this node element somehow. 

I did not test this thoroughly and I do not know for sure if this even works at all in the first place. It may only partially work, or only be a hint to the right track. 

If this or something like this does work, you perform this kind of modification at your own risk, and it may cause some problems. For this reason, I won't give too specific of guidance how you would perform this kind of modification. I believe this kind of modification might be prone to cause confusion or error, and such a hack like this also may need to be adjusted in future versions of the product in case something changes. You should only attempt this if you really need it, found no other supported way to do this, and if possible can test thoroughly in a development environment first.

It is also recommended, even after you determined this is really what you want and even after it seems to work "perfectly", to be prepared for potential future product changes to Dataverse and Model Driven Apps and how this may break this modification, and be prepared to promptly adjust or revert the modification and/or other fallback plans to minimize and adverse impact to the organization due to this modification breaking due to a product change or for another reason. This is because the change described here is probably not a supported type of modification for this product, so it is up to you to be extra careful with this one and more prepared than usual just in case, and you would assume any and all risks and be solely responsible for any consequences or impacts.

Check if above helps.



Helpful resources

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,200)