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. Image for the cookie policy date

XPMenus BackgroundColor

I have just upgraded an application to version of the Syncfusion controls. I have an issue where a line of code no longer works for me, and I cannot find the correct new code. Your knowledge base item below shows that this should still be correct, but I am getting an error that "MenuColors is not a member of XPMenus". Can you tell me the code I should be using to set the background color of my menu? ''Set the color of the Menu bar to the color of the form Syncfusion.Windows.Forms.Tools.XPMenus.MenuColors.MainMenuBackColor = Me.BackColor Thanks, JH Q10144 - Info: How do I change the default colors of the main-menu, dropdown menus, toolbars, etc.? There is a Syncfusion.Windows.Forms.Tools.XPMenus.MenuColors class that includes some static properties that you can change to get a custom BG color for the different portions of the menus and toolbars. For example: MainMenuBackColor, CommandBarBackColor and StatusBarBackColor.

1 Reply

AD Administrator Syncfusion Team June 21, 2004 09:45 AM

Hi JH We made some changes to the API and we are sorry for the inconvenience caused. Kindly take a look at the XPMenus sample(Tools\samples\Menus Package\XPMenusMDI). Refer to the CustomColorItem_Click() handler. Here is a snippet from the code for the handler: MenuColors.MenuBGColor = Color.FromArgb(251, 249, 243) MenuColors.DropDownBorderColor = Color.FromArgb(158, 133, 56) MenuColors.CheckedSelColor = Color.FromArgb(247, 243, 229) MenuColors.MenuLeftStripColor = Color.FromArgb(234, 222, 187) MenuColors.PressedSelColor = Color.FromArgb(220, 204, 158) MenuColors.SelBorderColor = Color.FromArgb(194, 163, 69) MenuColors.SelColor = Color.FromArgb(253, 252, 248) MenuColors.CommandBarBackColor = Color.FromArgb(234, 222, 187) Regards Arun

Live Chat Icon For mobile
Up arrow icon