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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Bar style and height changed after upgrading Syncfusion from v7 to v13.3

Thread ID:

Created:

Updated:

Platform:

Replies:

127682 Dec 2,2016 11:47 AM UTC Dec 5,2016 11:04 AM UTC WinForms 1
loading
Tags: MainFrameBarManager
Angus Tang
Asked On December 2, 2016 11:47 AM UTC

I am upgrading Syncfusion used in a .NET project from v7 to v13.3.
However, I have encountered the following problems:
  1. Bar seems changed to different style in blue
  2. Bar height is increased significantly
  3. The cell / header seems have more padding / margin
Can I know how to set the visual style back to before?

Attached please find the screen captures of the menu bar.
And the following is the relevant code of the menu:

// MainFrameBarManager and Bar
Bar mainBar;
MainFrameBarManager mainFrameBarManager = new MainFrameBarManager(form);
mainFrameBarManager.AutoLoadToolBarPositions = false;
mainFrameBarManager.AutoPersistCustomization = false;
mainFrameBarManager.EnableCustomizing = false;

mainBar = new Bar(mainFrameBarManager, name);

mainFrameBarManager.BeginInit();
mainFrameBarManager.Style = VisualStyle.Office2003;
mainFrameBarManager.Bars.Add(mainBar);
mainFrameBarManager.LargeIcons = false;

mainBar.BarStyle = BarStyle.IsMainMenu | BarStyle.Visible | BarStyle.DrawDragBorder | BarStyle.RotateWhenVertical | BarStyle.TextBelowImage | BarStyle.MultiLine;
mainBar.Manager = mainFrameBarManager;

mainFrameBarManager.EndInit();

// ParentBarItem
ParentBarItem parentBarItem = new ParentBarItem();
parentBarItem.ID = Guid.NewGuid().ToString();
parentBarItem.CategoryIndex = 0;
parentBarItem.Tag = new BarItemArgs(toolbarItem, mGeneration); // custom class
parentBarItem.Text = toolbarItem.Caption;
parentBarItem.Tooltip = toolbarItem.Description;
parentBarItem.PaintStyle = PaintStyle.ImageAndText;
parentBarItem.Shortcut = toolbarItem.Shortcut;
parentBarItem.Style = VisualStyle.Office2003;


Attachment: MainMenu_3bdae911.zip

Kannan R [Syncfusion]
Replied On December 5, 2016 11:04 AM UTC

Hi Angus, 
 
Thank you for contacting Syncfusion support.  
 
Query 1: How to get previous Height and Cell size? 
 
This reported requirement for modifying the MainFrameBarManager can be achieved by using its property named “UseBackwardCompatiblity”. 
 
Query 2: How to get previous appearance in Office2003 Visual Style? 
 
This modification has been done for standardizing the appearance of Visual Style themes in MainFrameBarManager control. So we suggest you to use Office2007 style and by using Office2007Theme Color Scheme, user can apply any desired color for it.  
 
Please make use of below code snippet for your reference.  
 
Code Snippet:[C#] 
 
 
this.mainFrameBarManager1.UseBackwardCompatiblity = true; 
 
private void colorPickerUIAdv1_Picked(object sender, Syncfusion.Windows.Forms.Tools.ColorPickerUIAdv.ColorPickedEventArgs args) 
        { 
            this.mainFrameBarManager1.Style = VisualStyle.Office2007; 
            this.mainFrameBarManager1.Office2007Theme = Office2007Theme.Managed; 
            Office2007Colors.ApplyManagedColors(this, args.Color); 
        } 
 
 
Screenshot 
 
 
 
We have also prepared sample for your reference and it can be downloaded from below location. 
 
 
Please let us know if it helps. 
 
Thanks 
Kannan 


CONFIRMATION

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.

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

;