We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the colors of metro theme?

GridGroupingControl has default colors for metro theme. You can customize the metro theme colors through GridMetroColors by using SetMetroStyle method and also you can set the BackColor for record plus or minus cell by using TableDescriptor or QueryCellStyleInfo event.

The following code example explains the same.

C#

VB

  1. Using TableDescriptor

C#

VB

2. Using QueryCellStyleInfo event

C#

VB

The following screenshot displays the customized metro style.

F:\Winforms\KB\DataGrid\CustomizedMetrotheme\Customized.png

Figure 1: Customized metro style

Sample Links

C#: CustomizedMetro

VB: CustomizedMetro

Article ID: Published Date: Last Revised Date: Platform: Control:
4494 04/19/2015 04/19/2015 Windows Forms GridGroupingControl
Tags:
Did you find this information helpful?
Comments
Truong Apr 09, 2018

Hi everyone !

How can i set BorderStyle equal None in Metro theme ?

Thank You
Best Regard !


Reply
Sindhu Nagarajan [Syncfusion] Apr 10, 2018

Hi Troung,

 

Suggestion1:

 To avoid the header border when Metro theme is applied to the GridGroupingControl,  HeaderBottomBorderColor property is set to Empty. Please refer to the below code.

 

Code Example

 

theme = new GridMetroColors();

theme.HeaderBottomBorderColor = Color.Empty;

this.gridGroupingControl1.SetMetroStyle(theme);

 

Suggestion2:

Also, you can use the below code to avoid the header border style,

this.gridGroupingControl1.TableDescriptor.Appearance.ColumnHeaderCell.Borders.Bottom = new GridBorder(GridBorderStyle.None);

 

Inorder to know about  customizing the appearance of the GridGroupingControl, please refer to the below UG link,

Appearance and Formatting

 

Sample Link:  http://www.syncfusion.com/downloads/support/directtrac/general/ze/CustomizedMetroTheme1528095856

 

 

Regards,

Sindhu

Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon