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. Image for the cookie policy date
close icon

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

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

1 Reply

KR Kannan R Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon