Set XPMenu bar visible

Hello, I use actually the version 4.1 and I have a problem when setting a toolbar visible or not. I use the following expression the set the toolbar visible or not. With older version it was working. void viewToolbar_Click(object s, System.EventArgs e) { this.toolbar1.BarStyle = this.toolbar1.BarStyle ^ BarStyle.Visible; } Thanks in advance. Régis

4 Replies

MJ Mano J Syncfusion Team February 28, 2006 01:23 PM UTC

Hi Regis, We regret for the inconvenience caused. I am able to see the problem with the BarStyle property and I have logged a bug report in this regard. Defect # 1598 - BarStyle property is not working when set dynamically. We will try our very best to fix this issue at the earliest and keep you informed. You can change the visibility of a bar by getting the CommandBar and use SetBarVisibility method and set the Bar''s visiblity to false. this.mainFrameBarManager1.GetCommandBarManager().SetBarVisibility(this.bar2, false); Please let me know if you have any questions. Thanks for using Syncfusion products. Regards, Mano


LK Leow Kah Man August 7, 2006 08:51 AM UTC

I have a custom Bar.

The initial values of the BarStyle:
AllowQuickCustomizing | MultiLine | Visible | DrawDragBorder

I use the following code to remove visibility:
bar.BarStyle -= BarStyle.Visible

The BarStyle property now returns:
AllowQuickCustomizing | MultiLine | DrawDragBorder

I then tried to add it back using:
bar.BarStyle |= BarStyle.Visible;

The value now becomes:
AllowQuickCustomizing | MultiLine | Visible | DrawDragBorder

However, the bar is still invisible.

4.202.0.37


LK Leow Kah Man August 7, 2006 09:02 AM UTC

I searched on this forum and found a suggestion:
CommandBar cmdBar = mainFrameBarManager.GetBarControl(bar);
cmdBar.Visible = true;

The CommandBar method works perfectly but not the BaseStyle method.

I tried to produce a sample but strangely my sample works fine using the BarStyle approach.



MJ Mano J Syncfusion Team August 7, 2006 06:20 PM UTC

Hi Leow,

I am also unable to see the problem in my test sample.

Can you please post the menus code in your application, so that we can re-create a sample with the code and try reproducing the problem with BarStyle?. You can also log an incident and post the code.

Regards,
Mano

Loader.
Up arrow icon