{"id":25284,"date":"2020-10-28T13:38:21","date_gmt":"2020-10-28T13:38:21","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=25284"},"modified":"2020-10-30T13:22:46","modified_gmt":"2020-10-30T13:22:46","slug":"match-the-theme-of-dynamics-365-app-in-power-apps-control-framework-part-1","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2020\/10\/match-the-theme-of-dynamics-365-app-in-power-apps-control-framework-part-1\/","title":{"rendered":"Match the theme of Dynamics 365 App in Power Apps Control Framework \u2013 Part 1"},"content":{"rendered":"<p style=\"text-align: justify;\"><a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/developer\/component-framework\/overview\" target=\"_blank\" rel=\"noopener noreferrer\">Power Apps Control Framework<\/a> is what we are using these days for creating re-usable and configurable custom UI or components in Dynamics 365 Modal driven apps.<\/p>\n<p>When it comes to designing a component, the Fluent UI is another Microsoft\u2019s tool that empowers developers to use built-in controls like Button, Date Picker, Label, Slider, Textbox, etc.<\/p>\n<p>If you have observed, you can find these Fluent UI controls automatically adjust to Dynamics 365 app\u2019s default theme.<\/p>\n<p>What is Dynamics 365 app\u2019s default theme? Follow the below steps and let us first check what the default theme is.<\/p>\n<p>Navigate to <strong>Advanced Settings -&gt; Settings -&gt; Customizations -&gt; Themes<\/strong><\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-001.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25286 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-001.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"1199\" height=\"373\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-001.png 1199w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-001-300x93.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-001-768x239.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-001-1024x319.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-001-660x205.png 660w\" sizes=\"(max-width: 1199px) 100vw, 1199px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">From the list of themes, open the \u201cCRM Default Theme\u201d which is the default theme of the application. Dynamics 365 app uses these colors in different areas of the application.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-002.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25287 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-002.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"497\" height=\"527\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-002.png 497w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-002-283x300.png 283w\" sizes=\"(max-width: 497px) 100vw, 497px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">However, from this list of colors, you will see the main color throughout your application is the above highlighted \u201cMain color\u201d. Now, let us check where you generally see this color.<\/p>\n<p>Open any entity record, click on \u201cAssign\u201d button, and just observe the color of \u201cAssign\u201d button. It is the same as that of the main color i.e. #3B79B7.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-003.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25288 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-003.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"486\" height=\"312\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-003.png 486w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-003-300x193.png 300w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Now, hover on the button and just observe if there is any color difference. Yes, there is a difference in color. Button hover color is a bit darker. This darker color is not present in the default theme record. This is an automatically generated color based on the main color.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-004.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25289 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-004.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"383\" height=\"256\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-004.png 383w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-004-300x201.png 300w\" sizes=\"(max-width: 383px) 100vw, 383px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">As mentioned above, the Fluent UI controls by default uses the same default theme scheme for the controls. Therefore, we always prefer and recommend you to use Fluent UI controls while working with Dynamics 365.<\/p>\n<p>Customer may want their business application (Dynamics 365) match with their branding and color scheme. That is why the Themes capability is added to Dynamics 365.<\/p>\n<p>Let us change the main color in theme and see how the button looks like. <em>(Note: If you want to make any changes in the Theme, copy existing theme and make changes in the new theme.)<\/em><\/p>\n<p>Change the main color in copy of the CRM Default Theme to #F41C5E<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-005.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25290 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-005.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"541\" height=\"445\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-005.png 541w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-005-300x247.png 300w\" sizes=\"(max-width: 541px) 100vw, 541px\" \/><\/a><\/p>\n<p>After publishing the theme, button starts to appear as below,<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-006.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25291 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-006.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"448\" height=\"300\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-006.png 448w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-006-300x201.png 300w\" sizes=\"(max-width: 448px) 100vw, 448px\" \/><\/a><\/p>\n<p>On hover, the color is a bit darker,<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-007.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25292 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-007.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"449\" height=\"307\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-007.png 449w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-007-300x205.png 300w\" sizes=\"(max-width: 449px) 100vw, 449px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Initially, I wondered where this darker color is coming as it is not defined anywhere in the Theme record. Later I found out the logic behind it. Based on the main color, Fluent UI Theme generates different shades of the color. Try <a href=\"https:\/\/fabricweb.z5.web.core.windows.net\/pr-deploy-site\/refs\/heads\/7.0\/theming-designer\/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">Fluent UI Theme Designer<\/a> and change the default primary color; you will see the different color slots.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-008.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25293 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-008.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"1345\" height=\"549\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-008.png 1345w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-008-300x122.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-008-768x313.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-008-1024x418.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-008-660x269.png 660w\" sizes=\"(max-width: 1345px) 100vw, 1345px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">How can we include this behaviour to our Fluent UI control that is being used in PCF or webresource?<br \/>\nBecause change in the theme main color will not reflect in our custom developed PCF controls or webresource. It will still appear in the default theme color.<\/p>\n<p>In this blog, I will illustrate how we can apply Dynamics 365 app theme\u2019s main color scheme to Fluent UI controls in Power Apps Control Framework.<\/p>\n<p>I am dividing this article into two parts. In this first part, I will show you how to match Dynamics 365 app theme in PCF control when the main color is known, and in the second part I will explain what if the main color is not known and needs a dynamic theme for custom UI.<\/p>\n<h2>Match Dynamics 365 App theme in PCF control when the main\/Primary color is known<\/h2>\n<p style=\"text-align: justify;\">You are developing a control specifically for one particular customer and you just need to customize for this single customer branding and color. In this case, we already know what color we want to use for controls and it is not necessary to be dynamic because it is going to be develop for the single customer.<\/p>\n<p>Let us see how we can achieve this,<\/p>\n<h3>Create PCF control and add Fluent UI controls<\/h3>\n<p style=\"text-align: justify;\">First, create PCF control or webresource and add Fluent UI Controls. You can find various resources over the internet to get started with PowerApps Component Framework and Fluent UI. If you have any existing PCF with Fluent UI project open and get started with that.<\/p>\n<p>To demonstrate, I have added Fluent UI controls as shown below,<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/011-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25300 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/011-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"1073\" height=\"577\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/011-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework.png 1073w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/011-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-300x161.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/011-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-768x413.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/011-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-1024x551.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/011-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-660x355.png 660w\" sizes=\"(max-width: 1073px) 100vw, 1073px\" \/><\/a><\/p>\n<h3>Design Theme using Fluent UI Theme Designer<\/h3>\n<p>Use <a href=\"https:\/\/fabricweb.z5.web.core.windows.net\/pr-deploy-site\/refs\/heads\/7.0\/theming-designer\/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">Fluent UI Theme Designer<\/a> to generate theme. Change the Primary Color and click on Export Theme button.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/012-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25301 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/012-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"1345\" height=\"549\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/012-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework.png 1345w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/012-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-300x122.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/012-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-768x313.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/012-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-1024x418.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/012-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-660x269.png 660w\" sizes=\"(max-width: 1345px) 100vw, 1345px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">This will open a panel that will provide us auto-generated code. This code we will use in our Fluent UI Project. To get a better understanding you can try and run this in Code Pen using \u201cExport to CodePen\u201d.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/013-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25302 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/013-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"556\" height=\"632\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/013-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework.png 556w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/013-Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-264x300.png 264w\" sizes=\"(max-width: 556px) 100vw, 556px\" \/><\/a><\/p>\n<h3>Update project to load this new theme<\/h3>\n<p>Add the import statement as shown below in your root component of the project. Root component is the container for all the controls used in the project.<\/p>\n<blockquote><p>import\u00a0{\u00a0loadTheme,\u00a0createTheme\u00a0}\u00a0from\u00a0&#8216;@uifabric\/styling&#8217;;<\/p><\/blockquote>\n<p>Then add generated code by Fluent UI Theme designer.<\/p>\n<blockquote><p>const\u00a0myTheme\u00a0=\u00a0createTheme({<\/p>\n<p>palette:\u00a0{<\/p>\n<p>themePrimary:\u00a0&#8216;#f41c5e&#8217;,<\/p>\n<p>themeLighterAlt:\u00a0&#8216;#fff6f8&#8217;,<\/p>\n<p>themeLighter:\u00a0&#8216;#fdd9e4&#8217;,<\/p>\n<p>themeLight:\u00a0&#8216;#fcb9cd&#8217;,<\/p>\n<p>themeTertiary:\u00a0&#8216;#f9749c&#8217;,<\/p>\n<p>themeSecondary:\u00a0&#8216;#f6356f&#8217;,<\/p>\n<p>themeDarkAlt:\u00a0&#8216;#dc1853&#8217;,<\/p>\n<p>themeDark:\u00a0&#8216;#ba1446&#8217;,<\/p>\n<p>themeDarker:\u00a0&#8216;#890f34&#8217;,<\/p>\n<p>neutralLighterAlt:\u00a0&#8216;#faf9f8&#8217;,<\/p>\n<p>neutralLighter:\u00a0&#8216;#f3f2f1&#8217;,<\/p>\n<p>neutralLight:\u00a0&#8216;#edebe9&#8217;,<\/p>\n<p>neutralQuaternaryAlt:\u00a0&#8216;#e1dfdd&#8217;,<\/p>\n<p>neutralQuaternary:\u00a0&#8216;#d0d0d0&#8217;,<\/p>\n<p>neutralTertiaryAlt:\u00a0&#8216;#c8c6c4&#8217;,<\/p>\n<p>neutralTertiary:\u00a0&#8216;#a19f9d&#8217;,<\/p>\n<p>neutralSecondary:\u00a0&#8216;#605e5c&#8217;,<\/p>\n<p>neutralPrimaryAlt:\u00a0&#8216;#3b3a39&#8217;,<\/p>\n<p>neutralPrimary:\u00a0&#8216;#323130&#8217;,<\/p>\n<p>neutralDark:\u00a0&#8216;#201f1e&#8217;,<\/p>\n<p>black:\u00a0&#8216;#000000&#8217;,<\/p>\n<p>white:\u00a0&#8216;#ffffff&#8217;,<\/p>\n<p>}<\/p>\n<p>});<\/p><\/blockquote>\n<p style=\"text-align: justify;\">To apply this theme call\u00a0loadTheme() by passing above theme object\u00a0immediately at app startup before any app code executes.<\/p>\n<blockquote><p>loadTheme(myTheme);<\/p><\/blockquote>\n<h3>Run and test changes:<\/h3>\n<p>This will automatically apply theme to all the Fluent UI controls in the app.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-014.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25303 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-014.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"419\" height=\"579\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-014.png 419w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-014-217x300.png 217w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">If you hover on the control, you will see darker shade of the color, which match with Dynamics 365 app theme.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-015.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter wp-image-25299 size-full\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-015.png\" alt=\"Match theme of Dynamics 365 App in Power Apps Control Framework\" width=\"422\" height=\"203\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-015.png 422w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2020\/10\/Match-theme-of-Dynamics-365-App-in-Power-Apps-Control-Framework-015-300x144.png 300w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/a><\/p>\n<h3>Override applied theme styling:<\/h3>\n<p style=\"text-align: justify;\">Sometimes you may want few components of the app off theme or with different styles. This you can do by simply applying style to individual control using styles property or using className. Refer following link to learn different ways of applying style to component:<\/p>\n<p><a href=\"https:\/\/github.com\/microsoft\/fluentui\/wiki\/Component-Styling\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/microsoft\/fluentui\/wiki\/Component-Styling<\/a><\/p>\n<h2><strong>Conclusion: <\/strong><\/h2>\n<p style=\"text-align: justify;\">We see how we can change default theme of Fluent UI Components and match with custom Dynamics 365 App theme when we know the theme is going to be static.<\/p>\n<p>I hope this will help you.<\/p>\n<p>In the <a href=\"https:\/\/www.inogic.com\/blog\/2020\/10\/match-theme-of-dynamics-365-app-in-power-apps-control-framework-part-2\/\" target=\"_blank\" rel=\"noopener noreferrer\">next part<\/a> of this blog, I will show how to match Dynamics 365 App theme in PCF where the theme color is not going to be static and need to be changed dynamically based on the main color defined in the Dynamics 365 Theme record.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Power Apps Control Framework is what we are using these days for creating re-usable and configurable custom UI or components in Dynamics 365 Modal driven apps. When it comes to designing a component, the Fluent UI is another Microsoft\u2019s tool that empowers developers to use built-in controls like Button, Date Picker, Label, Slider, Textbox, etc.\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2020\/10\/match-the-theme-of-dynamics-365-app-in-power-apps-control-framework-part-1\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16,19,2053],"tags":[545,592,1169,1941,1337,1338,1710],"class_list":["post-25284","post","type-post","status-publish","format-standard","hentry","category-dynamics-365","category-dynamics-crm","category-power-apps-portals","tag-dynamics-365-crm","tag-dynamics-crm","tag-microsoft-power-apps","tag-pcf-control","tag-power-apps","tag-power-apps-dynamics-365-crm","tag-theme"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/25284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=25284"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/25284\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=25284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=25284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=25284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}