Hi Bryan,
You would have to get hold of the BarControl of the CommandBarExt object associated with the XPMenus.Bar, and then handle its Paint event (as shown below) for this purpose :
// Get the CommandBarExt
CommandBarExt cmdbarext = this.mainFrameBarManager1.GetBarControl(this.bar1) as CommandBarExt;
// Get the CommandBarExt''s BarControl and subscribe to its Paint event
cmdbarext.BarControl.Paint += new PaintEventHandler(BarControl_Paint);
// CommandBarExt.BarControl''s Paint event handler
private void BarControl_Paint (object sender, PaintEventArgs e)
{
CommandBarExt cmdbarext = this.mainFrameBarManager1.GetBarControl(this.bar1) as CommandBarExt;
Rectangle rec1 = cmdbarext.ClientRectangle;
Graphics g = e.Graphics;
LinearGradientBrush brush = new LinearGradientBrush(rec1, Color.Yellow, Color.Red, 30);
g.FillRectangle(brush, rec1);
}
I have attached a
complete sample that illustrates this here. Please refer to it and let me know if this meets your requirements. We appreciate your patience and thanks for choosing Syncfusion products.
Regards,
Guru Patwal
Syncfusion, Inc.