Skip to content
Franco Mussopower pages
Desk with lamp and laptop
Photograph · Clint Patterson / Unsplash
Guide No.028
TutorialPower Pages

Embed a Canvas App in full screen mode, in Power Pages

This one is pretty niche… I recently had a requirement (well 2 in fact) to embed a canvas app into Power Pages in full screen mode.

Level
03CustomiseStage 3 of 4
Read
4 min
Includes
3 snippets · 2 figures
Written
Mar 2023

This one is pretty niche… I recently had a requirement (well 2 in fact) to embed a canvas app into Power Pages in full screen mode.

This very helpful page was my starting point. It provides the URL format needed for embedding.

Here’s the format. All you need to do is swap [AppID] with the actual ID of your canvas app (remember to lose the square brackets!):

https://apps.powerapps.com/play/[AppID]?source=website

Starting point – embed the canvas app using an iframe

Add a new page
Select … then iFrame

Power Pages
Screenshot of Pages workspace in Power Pages highlighting the Add Page button, more commands, and iFrame
Fig. 01Pages workspace in Power Pages highlighting the Add Page button, more commands, and iFrame

Enter the URL for your canvas app in the Embed URL field and click OK
Click Edit Code to open the web page for editing in Visual Studio Code

Power Pages
Screenshot of design canvas in Power Pages. Highlighting embed URL for an iframe, OK button and then Edit code button
Fig. 02Design canvas in Power Pages. Highlighting embed URL for an iframe, OK button and then Edit code button

Actually, I just went straight for code when creating mine…

Firstly, let’s provide some dimensions for the  iframe. These dimensions worked well for me. Feel free to tweak to your heart’s desire:

Here’s an example of my iframe code including width, height and a class (app ID excluded):

Embed Canvas App IframeHTML
<iframe frameborder="0" width="100%" height="768px" src="https://apps.powerapps.com/play/PASTE YOUR APP ID HERE?source=website" class="canvas-app-embed"></iframe>

I also add a class of canvas-app-embed. I could’ve called this anything really. Its only purpose is allowing us to select this for styling / scripting.

On the subject of scripting, that height I specified is just a rough starting point. I then use a little jQuery when the page loads to expand the iframe to the full height of the window:

jQuery to resize Canvas App iframe to full screenJavaScript
  $( document ).ready(function() {
    var windowHeight = $(window).height();
    $('.canvas-app-embed').attr('height',windowHeight + 'px');
  });

When VS code opens, we have 3+ files in the workspace:

Select the JS file first and paste in the jQuery from above
Press Ctrl + S to save

Next, select the HTML file.
Delete all but the iframe
Edit the style tag so width is 100% and height is 768px
Press Ctrl + S to save

Finally, select the CSS file.
Here’s some CSS that’ll hide your Power Pages website’s header and footer:

CSS to hide header and footerCSS
.navbar-static-top.navbar-inverse {
    display: none;
}
 
footer.footer {
    display: none;
}

…and that’s it.
Sync to bring your changes from VS code back to your Power Pages session
and then hit Preview and admire your work :)

Go deeper · Power Pages Mastery

This guide is one technique. The course is the method.

The course covers this in Level 1 · Foundations: “Portal architecture and design patterns”, alongside “Translating requirements into a build list”. A structured programme distilled from dozens of real portal launches — from messy stakeholder requirements to successful go-live.

  • 6 weeks
  • 3 levels
  • Live training + video lessons
Where this fits
  1. Level 1Foundations
    • Portal architecture and design patterns
    • Translating requirements into a build list
  2. Level 2Extending the platform
  3. Level 3Advanced customisation
There is a knowledge gap when we go from traditional Power Apps work to Power Pages. Franco’s depth of platform knowledge, creative problem-solving, and understanding of web design makes using him to skill up a team a no-brainer.
Tyler Page — Director & Solution Architect — MCA Connect
Filed under

4 comments

  1. Bhargav Reddy

    Great post and walkthrough Franco!! Keep inspiring.

  2. Mariusz

    Hi Franco.

    Great Post. It is very usefull.

    When you add the power page component “List” do you see in “List settings” the “Actions” to create, update, delete records ? – enhanced model.
    It was available on “List” in the standard model, but unfortunately I don’t see those settings in power pages with the enhanced model.

  3. Ryan

    Exactly what I needed, thank you for typing this up!

    1. Franco MussoAuthor

      You’re most welcome. Thanks for taking the time to share the feedback 🙂

Leave a comment

Your email address won’t be published. Comments are moderated.

Consulting

Need a Power Pages build that editors love and brands survive?

I help teams design and build Power Pages sites with bespoke UX. Tell me about yours.

Search

Book a discovery call

30 minutes. Bring your trickiest Power Pages problem — I’ll tell you honestly whether I’m the right fit.