I am currently working in the C# windows application with DevExpress controls.
Now I want to change back color of bar button item while loading the form.
I’ve tried following code:
barButton.Appearance.BackColor = Color.Red;
but the bar button back color not changed to red.
By default, bars use the skins to draw their content. In this case, all background colors are provided by specific skin elements, which cannot be changed. The only way to change a specific item’s background color is to disable skins:
put the
BarAndDockingControllercomponent onto a form, and assign it to theBarManager.Controllerproperty. SetBarAndDockingController.PaintStyleNameorLookAndFeelto any non-skin style(for example “Flat”). Then use theBar.Appearance.BackColorproperty to set the desired color.Alternatively, you can create your own custom barItem in a way similar to the one described in the How to change the background color of highlighted links KB article.