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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set XPMenu bar visible

Thread ID:





41347 Feb 28,2006 09:33 AM UTC Aug 7,2006 06:20 PM UTC WinForms 4
Tags: Tools
Regis Mettraux
Asked On February 28, 2006 09:33 AM UTC

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

Mano J [Syncfusion]
Replied On 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

Leow Kah Man
Replied On 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.

Leow Kah Man
Replied On 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.

Mano J [Syncfusion]
Replied On 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.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon