Skip to content

Commit 6bc12de

Browse files
authored
Merge pull request #713 from telerik/nkaraiva/kb-custom-theme-as-default
small fixes
2 parents d8128b6 + c2b554d commit 6bc12de

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

+7-6
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ namespace Windows11LightBlueClassLibrary
4848
{
4949
ThemeRepository.RegisterTheme(this);
5050
}
51+
5152
public override void Load()
5253
{
5354
if (!loaded || this.IsDesignMode)
@@ -57,6 +58,7 @@ namespace Windows11LightBlueClassLibrary
5758
this.LoadResource(resourceAssembly, "Windows11LightBlueClassLibrary.Windows11CompactLightBlue.tssp");
5859
}
5960
}
61+
6062
public override string ThemeName
6163
{
6264
get { return "Windows11CompactLightBlue"; }
@@ -71,7 +73,7 @@ namespace Windows11LightBlueClassLibrary
7173
7274
![custom-theme-as-default001](images/custom-theme-as-default001.png)
7375

74-
4. Once the Windows11LightBlueClassLibrary gets ready, we should define the custom Windows11CompactLightBlue theme as default in the entire application. This can be done inside the App.config file of our application. For more information, follow the instrucions defined here: [Custom theme as Default](https://docs.telerik.com/devtools/winforms/styling-and-appearance/default-theme#custom-theme-as-default)
76+
4.Once the Windows11LightBlueClassLibrary gets ready, we should define the custom Windows11CompactLightBlue theme as default in the entire application. This can be done inside the App.config file of our application. For more information, follow the instrucions defined here: [Custom theme as Default](https://docs.telerik.com/devtools/winforms/styling-and-appearance/default-theme#custom-theme-as-default)
7577

7678
````XML
7779

@@ -89,13 +91,13 @@ namespace Windows11LightBlueClassLibrary
8991

9092
````
9193

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.
94+
>note 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.
9395
94-
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.
96+
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.
9597

9698
![custom-theme-as-default002](images/custom-theme-as-default002.png)
9799

98-
6. If you do not want to add the theme at design time, you can create an instance of the theme in the start up of the application, for example in Program.cs:
100+
6.If you do not want to add the theme at design time, you can create an instance of the theme in the start up of the application, for example in Program.cs:
99101

100102
````C#
101103

@@ -116,9 +118,8 @@ internal static class Program
116118

117119
````
118120

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

121-
> [!TIP]
122123
> 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).
123124
124125

0 commit comments

Comments
 (0)