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.

GroupBar BorderColor Resetting

Thread ID:

Created:

Updated:

Platform:

Replies:

129476 Mar 21,2017 07:02 AM Mar 22,2017 11:59 PM Windows Forms 1
loading
Tags: GroupBar
DanH
Asked On March 21, 2017 07:02 AM

Setting a GroupBar BorderColor in the designer changes the border in the designer, but when running, it changes back to White.

If I set the BorderColor through code, it works fine.

Mallika Kannan [Syncfusion]
Replied On March 22, 2017 11:59 PM

Hi Dan, 
 
Thank you for contacting Syncfusion support. 
 
In GroupBar Control, the Border Color customization will be serialized once it is modified and then Visual Style customization code will be serialized.   
 
Border Style customization 

 
 

Visual Style Customization 

 
Figure 4: Visual style to Metro. 
 
 
As Serialized code snippet in Form Designer.cs, Visual Style code snippet applied after the Border Color customization, So default Border Color customization defined for chosen Visual Theme will be applied. So Border Color defined in sample designer will be overridden.  
 
 
 

Result 
 
 
 
So this is not an issue and this problem can be resolved by setting the Border color through code after Visual Style customization is applied.  
 
Please refer the following code snippet, 
 
  //set Border Color 
 
             
this.groupBar1.BorderColor = Color.Red; 
 
 
 
 
After running the Border color is displayed. 
 
Screenshot  
 
 
 
We have also prepared the sample for your reference. It can be downloaded from the following Link.   
   
   
Kindly check with above solution and let us know if it is helpful.    
    
Regards    
Mallika   


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;