Accessing Internal Bar TabStrip Control
When using Bar control as dockable window with multiple dock tabs, the Bar control creates internal TabStrip control to represents the tabs. The internal tab strip control is returned when Bar.DockTabControl property is referenced.The Bar control however, depending on it state, might recreate t ...
Changing DockContainerItem.Visible
Method below has been included now in BarUtilites library that ships with DotNetBar. You can use it instead of the method coded below. BarUtilites.SetDockContainerVisible ________________________________________________________ Method below encapsulates all the logic that you need to hide the Do ...
Controls not displayed on auto-hide bars
Some controls when hosted on dockable auto-hide bars are not displayed when bar is flying out of auto-hidden state DotNetBar uses the standard Windows API’s for bar animation when showing the bars from auto-hidden state. Some controls do not include full support for this functionality; in ...
Data Binding on undocked/floating Bars, dockable windows
If you are using data binding with your controls that are part of the dockable bars that can be placed in floating mode you might need to update the BindingContext on the floating bar's form so functionality that relies on updating the common BindingContext like for example DataGridView sorting ...
Dockable Bar.Text property changes do not appear
If you are setting Bar.Text property on dockable bar (LayoutType=DockContainer) and your values do not appear on screen or appear that they are not serialized check the setting of the Bar.AutoSyncBarCaption property. AutoSyncBarCaption property is by default set to true which indicates to the do ...
Docking Concepts
DotNetBar includes very flexible docking engine for dockable windows and toolbars. Docking windows and toolbars are added to the Dock Sites (DockSite) controls which are automatically created for you when you add DotNetBarManager to the form. Dockable Windows Docking Dock Sites There are total o ...
Document Docking
In Docking Concepts docking on all 4 sides of the form were covered. This topic covers Fill docking or Document Docking capabilities of DotNetBar Suite. To quickly get started with Document Docking please watch the Document Docking Tutorial on our web site. Document Docking is enabled by right- ...
How to access dockable bar AutoHidePanel
AutoHidePanel is the control that internally DotNetBar creates when it needs to display the bars in auto-hide state (AutoHide=true). The AutoHidePanel is responsible for the appearance of the bars while they are in auto-hide state. It displays them as tabs and it is responsible for the fly-out b ...
How to Create Context Menus
Creating the context menus consists of adding the ContextMenuBar control to the form and using the designer action items or right-click context menu commands to add items to it. The top level button that is added to the ContextMenuBar acts as the context menu parent that is assigned to the contr ...
How to create Dockable Windows
Creating and manipulating dockable windows using DotNetBar is very easy and does not require writing any code. Follow these steps to create dockable windows: Add DotNetBarManager to the the form Right-click DotNetBarManager icon and choose one of the Create Dock Bar context menu commands Add you ...
How to Create Menu Using Code
You can create menus in either design-time using the DotNetBar Windows Forms designer or in run-time by writting the the code to do so. You can always create the menu in design-time and explore the InitializeComponent method that is automatically created on the form and which will have all the c ...
How to Create Popup Menu or Toolbar
Please create first top-level items either menu or toolbar see appropriate how to samples. Note that you can always perform this in design-time using DotNetBar Windows Forms designer by simply right-clicking the Button on Bar or any other DotNetBar control and using the context menu commands lie ...
How to Create Toolbars Using Code
You can create toolbars in either design-time using the DotNetBar Windows Forms designer or in run-time by writting the code. You can always create the toolbar in design-time and explore the InitializeComponent method that is automatically created on the form and which will have all the code tha ...
How to customize Office 2007 color table on per Bar or Control instance
Many controls that support Office 2007 style allow you to specify an custom renderer to be used only for that instance of the control.Using that you can customize the color table on per control basis when control is using Office 2007 style. In general following steps are needed to do that:Instru ...
How to cycle through active docked documents using Ctrl+Tab key combination
If you wish to use Ctrl+Tab key to move through the document dock tabs on active Bar control add following code to your form to enable that:C#: protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { // Detect the keys pressed and ensure that there is an active control if ((ke ...
How to dynamically display list of bars on menu
To display the list of the bars on the popup menu you can use DotNetBarManager.ExpandedChange event to dynamically add/remove ButtonItem objects that describe the bars.Sample attached below is modified DockableWindows sample that shows how to do that. Note that under Bars menu item there is a pl ...
How to find out which docked document has input focus
When using Document Docking DotNetBar functionality usually there is a need to find out the Bar control that has input focus, for example if you are hosting edit controls.To do that you would use standard Windows Forms methods. For example following function can be used to get the active bar:C# ...
How to popup menu with NotifyIcon
Samples below demonstrates how to popup DotNetBar menu when using NotifyIcon control.If you are using VS.NET 2005 download NotifyIconPopupMenuVS2005.zip project.Here is relevant code that shows menu from NotifyIcon: Dim p As Point = Control.MousePosition Dim popupSize As Size = popup1.PopupSiz ...
How To Save Default Docking Layout
Following code can be used in Form Load event to save default layout to a string:private void SaveDefaultLayout() { ArrayList customBars = new ArrayList(); foreach (Bar bar in dotNetBarManager1.Bars) { if (!bar.CustomBar) { bar.CustomBar = true; customBars.Add(bar); } } m_DefaultLayou ...
How to tear-off DockContainerItem using code
Tearing off the DockContainerItem from the Bar control involves following steps:Remove DockContainerItem from its current BarCreate new Bar to host the DockContainerItemAdd DockContainerItem to the newly created Bar controlAdd Bar control to the DotNetBarManagerFloat or Dock the BarC# Code: // ...