ADAdministrator Syncfusion Team October 6, 2004 01:42 PM
As a workaround handle the CommandBar''s Paint event to custom paint it instead of its BackColor property.
private void commandBar1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
LinearGradientBrush brush = new LinearGradientBrush(this.commandBar1.Bounds, Color.Yellow, Color.Red, 45, true);
e.Graphics.FillRectangle(brush, this.commandBar1.Bounds.X, this.commandBar1.Bounds.Y, this.commandBar1.Bounds.Width, this.commandBar1.Bounds.Height);
Please refer to the test sample that illustrates this and let me know if this meets your requirements.
ADAdministrator Syncfusion Team October 6, 2004 05:10 PM
Thanks for the reply and sample code. I''m sorry, but, I should have told you that I was using an XPMenu Bar and not a CommandBar and as such, the sample code does not work for an XPMenu Bar :(
Can it be done for the latter?
ADAdministrator Syncfusion Team October 7, 2004 05:25 AM
Please refer to the sample attached here that shows how you could custom paint the XPMenus.Bar :
Bar Painting Sample