Colorize the backround and the hovering

Hello,

The example from your documentation doesn't seem to work.

this.contextMenuStripEx.BackColor = System.Drawing.Color.SkyBlue;

It only changes the bordercolor (if i look into the contextmenu on the form in the designer and set the color there, it's displayed in the right color but not in runtime).

How can i use my custom color for the background (40,40,40) and the hover color (gray or argb).

I also discovered that the corners are weird at runtime as shown in your documentation.

Appearance in Windows Forms ContextMenuStrip control | Syncfusion

Shouldn't it look like this?

It's displayed like this:


Regards


5 Replies 1 reply marked as answer

VR Vijayalakshmi Roopkumar Syncfusion Team August 3, 2021 03:04 AM UTC

HI Young 
  
Thank you for your update. 
  
We have checked the reported behavior "Background property is not working with ContextMenuStrip", but it is not reflected. Also we are working on about corner radius and custom background issue. We will check this and update you the complete solution on 4th Aug, 2021. 
  
Regards, 
Vijayalakshmi VR 



VR Vijayalakshmi Roopkumar Syncfusion Team August 4, 2021 06:53 AM UTC

Hi Young 
 
Thank you for your patience. 
  
Query 
Solution 
How to change the background color value? 
  
You can customize the background color of ContextMenuStrip using RenderMode property. 
  
  
this.contextMenuStripEx2.RenderMode = ToolStripRenderMode.System; 
            this.contextMenuStripEx2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); 
            this.contextMenuStripEx2.ForeColor = Color.White; 
  
  
 
  
How to change the hover value 
Currently we don’t have any support to change the hover color value. 
  
Note: We’ll log the feature report based on the update from the customer. 
  
I also discovered that the corners are weird at runtime as shown in your documentation 
We have consider it as bug and logged a report on this. The patch for this fix is estimated to be available on 18th Aug, 2021. You can track the status of this defect using the following feedback link: 
 

Regards,
Vijayalakshmi VR
 


Marked as answer

YO Youki replied to Vijayalakshmi Roopkumar August 5, 2021 05:41 PM UTC

Ok, Thanks.

Found a really cool and easy solution (colortable class):
c# - Color change for MenuItem - Stack Overflow



VR Vijayalakshmi Roopkumar Syncfusion Team August 6, 2021 03:13 AM UTC

Hi Young 
  
We glad that you found solution to meet your requirement. 
  
Please let us know if you need any other assistance on this. 
  
Regards, 
Vijayalakshmi  VR 



VR Vijayalakshmi Roopkumar Syncfusion Team August 18, 2021 11:57 AM UTC

Hi Young 
  
Thank you for your patience. 
  
We have fixed the reported behavior “Corner looks weird in contextmenustrip” and patch for the same can be downloaded from following links.   
  
Recommended approach - exe will perform automatic configuration.   
   
Please find the patch setup from below location:   
   
  
   
  
   
  
Assembly Version: 19.2.0.44 
   
Installation Directions:   
This patch should replace the files "Syncfusion.Tools.Windows under the following folder.   
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]   
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\19.2.0.44\precompiledassemblies\19.2.0.44\4.6   
   
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you must manually copy and paste them to the preferred location or you must run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.   
   
  
   
Please try this patch and let us know if it is resolved at your end. 
   
Regards,   
Vijayalakshmi VR 


Loader.
Up arrow icon