BarManager Class

The BarManager manages a form's menus and tool bars and lets it participate in the user-customization feature.
Object Model
BarManager ClassBars ClassBar ClassIntList ClassBarCustomizationDialog ClassCustomizationDndHelper ClassBarItem ClassImageListAdv ClassImageListAdv ClassImageListAdv ClassImageListAdv ClassImageListAdv ClassBarItems ClassBarItem ClassImageListAdv ClassMainFrameBarManager ClassImageListAdv ClassImageListAdv ClassBarItem ClassBarManagerVisualStyle Class
<DesignerAttribute(Syncfusion.Windows.Forms.Tools.Design.BarManagerDesigner, System.ComponentModel.Design.IDesigner)>
Public Class BarManager 
   Inherits Syncfusion.Windows.Forms.Core.BaseComponent
   Implements Syncfusion.Windows.Forms.IIgnoreWorkingArea, Syncfusion.Windows.Forms.IVisualStyle, IBarItemsRepository, Syncfusion.WinForms.Theme.IThemeProvider 
Dim instance As BarManager
[Designer(Syncfusion.Windows.Forms.Tools.Design.BarManagerDesigner, System.ComponentModel.Design.IDesigner)]
public class BarManager : Syncfusion.Windows.Forms.Core.BaseComponent, Syncfusion.Windows.Forms.IIgnoreWorkingArea, Syncfusion.Windows.Forms.IVisualStyle, IBarItemsRepository, Syncfusion.WinForms.Theme.IThemeProvider  

The BarManager should contain a reference to all the BarItems (Items property) that you intend to use in the associated form's menu structure and the tool bars. The BarItems should have a unique ID. The BarManager also has a list of tool bars (Bars property) associated with the form. There is a "Customize" verb associated with the BarManager's designer which will allow you to design your form's menu structure and tool bars visually during design-time without writing a single line of code. Use the "Activate Menus" verbs in the VS2003 designer in case the menus/toolbars don't respond to mouse clicks in the designer.

The BarManager also allows you to set certain global settings like enabling user-customization, enable partial menus, enable large icon mode for tool bars, etc.

You don't normally use this class directly. You would instead use one of the following derived classes based on your form type. Use a MainFrameBarManager (for the main window in an MDI and SDI scenario) or a ChildFrameBarManager(for the child windows in an MDI scenario). Since the BarManager is a component derived class, you can simple drag and drop one of the above managers on your form during design-time to bind it to your form.

When initializing one of the derived classes in code, make sure to call BeginInit and EndInit.

Note: A BarManager (ChildFrameBarManager or MainFrameBarManager) cannot be simultaneously used with a Syncfusion.Windows.Forms.Tools.CommandBarController. Use the MainFrameBarManager.DetachedCommandBars property to add generic tool bars to your form.

Take a look at our XPMenus samples under the Tools\Samples\Menus Package folder for usage example.
Inheritance Hierarchy



Syncfusion.Tools.Windows: 17.4460.0.46

See Also