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.
Attachment: MainMenu_3bdae911.zip
However, I have encountered the following problems:
- Bar seems changed to different style in blue
- Bar height is increased significantly
- 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
SIGN IN To post a reply.
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.
Sample Location: http://www.syncfusion.com/downloads/support/forum/127682/ze/MainFrameBarManager-1613538232
Please let us know if it helps.
Thanks
Kannan
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
AT Angus Tang
- Dec 2, 2016 11:47 AM UTC
- Dec 5, 2016 11:04 AM UTC