2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Customize the metro styleWinForms GridControl have default colors for metro theme. You can customize the metro theme colors through GridMetroColors by using SetMetroStyle method. The following code example explains the same. C# //VisualStyles and themes GridMetroColors theme = new GridMetroColors(); //changes the header color on mouse hovering. theme.HeaderColor.HoverColor = Color.CadetBlue; //sets the header color on normal state. theme.HeaderColor.NormalColor = Color.PowderBlue; //sets the BottomBorderColor. theme.HeaderBottomBorderColor = Color.Red; //sets the headertextcolor. theme.HeaderTextColor.NormalTextColor = Color.Navy; //changes the header text color on mouse hovering. theme.HeaderTextColor.HoverTextColor = Color.GhostWhite; //Applys the customized theme to the gridControl metrostyle. this.gridControl1.SetMetroStyle(theme); VB 'VisualStyles and themes Dim theme As New GridMetroColors() 'changes the header color on mouse hovering. theme.HeaderColor.HoverColor = Color.CadetBlue 'sets the header color on normal state. theme.HeaderColor.NormalColor = Color.PowderBlue 'sets the BottomBorderColor. theme.HeaderBottomBorderColor = Color.Red 'sets the headertextcolor. theme.HeaderTextColor.NormalTextColor = Color.Navy 'changes the header text color on mouse hovering. theme.HeaderTextColor.HoverTextColor = Color.GhostWhite 'Applys the customized theme to the gridControl metrostyle. Me.gridControl1.SetMetroStyle(theme) The following screenshot displays the customized metro style. Figure 1: Customized metro style Note: The same procedure is applicable for GridDataBoundGrid.
Conclusion I hope you enjoyed learning how to customize the color of metro theme in WinForms GridControl or GridDataBoundGrid.
Refer to our WinForms GridControl’s feature tour page for its other groundbreaking feature representations. You can also explore our WinForms GridControl documentation to understand how to present and manipulate data.
For current customers, check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, try our 30-day free trial to check out our WinForms GridControl and other WinForms components.
Please let us know in the following comment section if you have any queries or require clarifications. Contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.