web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Enhance the PowerApps ...
Power Apps
Suggested Answer

Enhance the PowerApps Custom App Theme capabilities

(2) ShareShare
ReportReport
Posted on by 358
Hi,
in our Apps we have to use a large variable called gvLayout for all our universal settings such as Label fonts, Text field fonts, and so on:
 
so in our App_OnStart we use this:
Set(
    gvLayout,
    {
        HeaderHeight: 70,
        FooterHeight: 65,
        ButtonHeight: 70,
        CheckBoxFontColor: Color.Black,
        CheckBoxFontFamily: "Segoe UI",
        CheckBoxFontSize: 9,
        CheckBoxFontWeight: "Semibold",
        CmdButtonWidth: 200,
        CmdButtonHeight: 30,
        CmdButtonFontColor: Color.Black, // or should this be Color.Black ?
        CmdButtonFontFamily: "F37 Ginger",
        CmdButtonFontSize: 13,
        CmdIconHeight: 24,
        // gvLayout.CmdButtonHeight*0.8,
        TextFieldFontColor: Color.Black, // or should this be Color.DarkBlue ?
        TextFieldFontFamily: "F37 Ginger",
        TextFieldFontSize: 14,
        DataTableFontSize: 12,
        DefaultBorderWidth: 2,
        ErrorMessageFontSize: 12,
        ErrorMessageFontColor: Color.DarkRed,
        ErrorMessageFontWeight: "Bold",
        FormAccentFill: Color.DarkBlue,     // Cheat line above each Form Header DataCard
        HeaderFontFamily: "BHF Beats",
Then for every one of our controls we have to set the Font, Fontsize, Size, Weight with formulae like this:
 
This can be over TWO HINDRED INDIVIDUAL CONTROLS TO BE SET
 
So, is it possible to add this kind of capability to the App Theme Editor so we can set our global fonts once?

Additionally, can we set things like  Default indent for controls when they are added as part of a card for example?
Categories:
I have the same question (1)
  • Suggested answer
    crisfervil Profile Picture
    126 on at
     
    I would use the code view functionality in Canvas Apps to do this.
    You have to do this screen by screen though.
     
    1. Create a back up of your app in case something goes wriong and you need to restore it.
    2. Open the first screen, and copy its yaml code using the view code function.
    3. Paste the code in a code editor, like Visual Studio code. Notepad would work also.
    4. Find and replace the properties you want to replace with the fonts or any other property on your style. For example, replace Font: ="Verdana" with Font: =gvLayout.LabelFontFamily
    5. Remove all the controls on the screen.
    6. Copy the code with the changes from the code editor.
    7. Paste the YAML code on the screen.
       
    Repeat for every screen on your app.
     
     

     
    I hope it helps, 
    Cris

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard