Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Collapse]Ribbon, Bars and Menu
   [Expand]Bars
   [Expand]Ribbon
   [Expand]Popup Menus
    Radial Menu
   [Expand]Common Features
   [Collapse]Examples
    [Collapse]Bars
      How to: Add an item to a category
      How to: Add Items to a Container Bar Item (Menu)
      How to: Add Items to Bars' Customization Menu
      How to: Change the Default Customization Form's Behavior
      How to: Change the paint style
      How to: Create a category and add a bar item to it
      How to: Create and Customize an Item and Its Item Links
      How to: Create Bars in Code
      How to: Custom Paint a Menu Bar of a Popup Menu
      How to: Custom Paint a Menu Bar of a Sub-Menu
      How to: Customize Font Settings for Specific Items
      How to: Focus a specific command within a menu
      How to: Iterate through items that belong to a specific category
      How to: Merge bars manually
      How to: Prevent an In-Place Editor from Being Activated
      How to: Prevent Specific Shortcuts from Being Processed by the BarManager
      How to: Save the layout of bars to a file
      How to: Save the layout of bars to a stream
      How to: Save the layout of bars to the system registry
    [Expand]Ribbon
    [Expand]Popup Menus
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Merge bars manually

Assume you have parent and child MDI forms. On each one you place a Bar Manager and create an Edit toolbar. When the child MDI form is activated, we want to merge these toolbars (XtraBars supports automatic merging of main menus only). For this purpose, the BarManager.Merge event is handled. Toolbars are merged using the Bar.Merge method.

When the child form becomes inactive (for instance, focus may move to another form), we need to restore the original main menu layout of the parent form. For this purpose, the Bar.UnMerge method is called in an BarManager.UnMerge event handler.

How would you rate this topic?​​​​​​​