The project demonstrates application of high contrast dark theme to the WinForms DataGrid (SfDataGrid).
To apply the high contrast theme to DataGrid:
- Add the reference of the exported theme library in the application.
- Load the assembly using the
SkinManager. - Set the
ThemeNameproperty of the DataGrid to the name given to the theme library.
The following code demonstrates the high contrast black theme set to the DataGrid control.
//Load theme assembly into application using SkinManager
SkinManager.LoadAssembly(typeof(HighContrastBlackTheme).Assembly);
SfDataGrid sfDataGrid = new SfDataGrid();
//Other code blocks to bind a data source and define columns for DataGrid
//Apply high contrast theme to SfDataGrid
sfDataGrid.ThemeName = "HighContrastBlackTheme";
this.Controls.Add(sfDataGrid);Now, run the application and experience the control's rich user interface.

