- Online Barcode Generator
- How To
- Buy Now
C# Create Custom Theme for Windows Forms
KetticTheme control supports not only the standard themes and skins, but some unique skins and appearance. The UI designers are able to build cool Windows Forms to meet and even exceed the end usersâ expectations. For example, it is support the metropolis, shark, darkroom, high contrast, caramel, money twins, blueprint, whiteprint, coffee, liquid sky, and glass oceans etc. Additionally, this control utilize the bitmap based skin library for all controls and also ship a windows forms theme and skin editor to easily modify the existing themes and skins when you need to customize them.
Customize Themes through Custom Style Creator
KetticUI WinForms control provides the custom style creator for the UI designers to create custom styles and appearance for the interfaces. It allows the developers customize a theme at once, as well as the entire Kettic UI controls. After we customize the theme, we can save it and then apply it to the Windows application.
Save a Custom Theme via Custom Style Creator
After we process the customization of a theme, we can select the Save option to store the changes. The Custom Style Creator is able to detect the changes of the theme and will overwrite the loaded files through the new XML data. When you create a new custom theme, the Custom Style Creator is able to show a Save As dialog and allows you to select the location and theme name for the new theme. And the theme will be saved as .tssp file.
C# Load Theme Package to .NET project
KetticTheme control provides the ThemeResolutionService for loading a theme package to .NET Windows project. There are two different methods available, the LoadPackageResource and the LoadPackageFile.
When the resource of the path to the package is the original one, it is better to use the LoadPackageResource method to load the theme package. This method is able to load a theme package file as an EmbeddedResource. And the ThemeFolder part shall be used when the package is included in a folder in the main project directory in C#.NET. The following C# code shows how to load the theme package.
When the path of the theme package has been changed, it is better to use the LoadPackageFile method to load a theme file. This method is able to load a file from a specified directory on the system. The C# code below shows how to achieve this.
C# Applying a Theme to Windows application
The following C# code demonstrates how to apply a theme to the entire Windows Forms application.
To apply the theme to a single control, we are able to use the C# code below
Additionally, we are able to apply a theme to all instances of a specific WinForms control in a form. And the C# code snippet below shows how to do that.
UI Controlsfor Windows Forms.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls