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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard