Skip to content

Commit c884271

Browse files
ES-975464 - Resolve the ReadMe file length issue in this sample repository
1 parent f816ec2 commit c884271

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
# data-grid-high-contrast-theme
2+
23
The project demonstrates application of high contrast dark theme to the [Syncfusion DataGrid](https://www.syncfusion.com/winforms-ui-controls/datagrid) control for WinForms.
34

5+
To apply the high contrast theme to Syncfusion Windows Forms controls:
6+
7+
* Add the reference of the exported theme library in the application.
8+
* Load the assembly using the `SkinManager`.
9+
* Set the `ThemeName` property of the controls to the name given to the theme library.
10+
11+
The following code demonstrates the high contrast black theme set to the `DataGrid` control.
12+
13+
``` c#
14+
//Load theme assembly into application using SkinManager
15+
SkinManager.LoadAssembly(typeof(HighContrastBlackTheme).Assembly);
16+
SfDataGrid sfDataGrid = new SfDataGrid();
17+
//Other code blocks to bind a data source and define columns for DataGrid
18+
//Apply high contrast theme to SfDataGrid
19+
sfDataGrid.ThemeName = "HighContrastBlackTheme";
20+
this.Controls.Add(sfDataGrid);
21+
```
22+
423
## How to run the project
524

625
* Checkout this project to a location in your disk.

0 commit comments

Comments
 (0)