Skip to content

Commit 7adfecd

Browse files
committed
Add new note and other small fixes
1 parent e2e11b7 commit 7adfecd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

knowledge-base/custom-theme-as-default.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ res_type: kb
1616

1717
## Description
1818

19-
As you may already know, Telerik Presentation Framework allows users to customize any pre-defined themes that Telerik UI for WinForms offers. We provide an opportunity thanks to [Visual Style Builder]({%slug winforms/tools/visual-style-builder%}) tool to customize the appearance of our controls to achieve the desired style for your application.
19+
Telerik Presentation Framework allows users to customize any pre-defined themes that Telerik UI for WinForms offers. We provide an opportunity thanks to [Visual Style Builder]({%slug winforms/tools/visual-style-builder%}) tool to customize the appearance of our controls to achieve the desired style for your application.
2020

2121
Let's pretend, we already have applied customizations and there is a custom theme already setup. For the perpose of this example, I prepared my custom **Windows11CompactLightBlue** theme which overrides the **Windows11Compact** theme. I generate variation by using [Windows11CompactTheme Blending]({%slug winforms/tools/visual-style-builder/working-with-visual-style-builder/windows11-themes-blending%}) feature. I created a theme variation and use LightBlue accent color to provide my theme new fresh look. Now, it is time to start using my custom theme.
2222

@@ -89,6 +89,8 @@ namespace Windows11LightBlueClassLibrary
8989

9090
````
9191

92+
>important It is important to specify the exact TelerikWinFormsThemeAssemblyName, Version, Culture and PublicKeyToken values. These values defined in the app.config should strictly match the same values from the custom theme assembly in order to make sure that the theme should be correctly applied at design time as well as at run time.
93+
9294
5. Build the whole solution. Now, we can find our Windows11CompactLightBlue theme in the VS Toolbox at design time and simply drag-drop it onto RadForm as any other component. You can see the Windows11LightBlue instance in the compoenent tray. From now on, any Telerik control that you add to RadForm would have the custom theme applied automatically.
9395

9496
![custom-theme-as-default002](images/custom-theme-as-default002.png)
@@ -114,11 +116,11 @@ internal static class Program
114116

115117
````
116118

117-
We are finished :partying_face:! The Windows11CompactLightBlue theme is now used as default for entire application both at design time or run time.
118-
119+
We are finished :partying_face:! The Windows11CompactLightBlue theme is now used as default for entire application both at design time and run time.
119120

120121
> [!TIP]
121-
> Complete projects on .NET9 and NET Framework 48 are available in our SDK repo [here].
122+
> Complete projects in .NET9 and NET Framework 48 are available in our SDK repo [here](https://github.com/telerik/winforms-sdk/tree/master/Themes/CustomThemeAsDefault).
123+
122124

123125
## See Also
124126

0 commit comments

Comments
 (0)