Skip to content

Repository files navigation

How to Apply HighContrastTheme to WinForms DataGrid?

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 ThemeName property of the DataGrid to the name given to the theme library.

Theme Library Added into User Application

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.

High Contrast Black Theme Applied to DataGrid control

About

The project demonstrates application of high contrast dark theme to the Syncfusion DataGrid control for WinForms

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages