For todays post I picked an easy target 🙂 menus, toolbars and context menus. As opposed to previous versions, in DotNetBar 6.0 the menus and toolbar are designed directly on the form. It is very easy to create and maintain menus and toolbars. You can watch short Video that shows how to do that here.

One of the often overlooked features in DotNetBar is the Global Items feature. It is demonstrated in that video, but in short it lets you connect the buttons that perform same function in UI, like Save, so that certain properties are replicated to all instances of the same command. You do that by tagging the items using GlobalName property.

Imagine, in most applications you have Save, Open, New etc. commands that are replicated in at least two places: Menu and Toolbar or Ribbon and Quick Access Toolbar or Menu. Now each instance is separate, so when you disable one instance, unless all instances are connected, you have to disable every single one. In DotNetBar, you just tag them with same string and they all get disabled when you disable any one of the commands. You can read more about global items feature in help file where all properties that are replicated are listed.
The menus we have are really flexible. You can for example host other controls on them, any .NET Windows Forms control will do. Here is screenshot of context menu from the Context Menu Bar Video that is hosting standard ListBox control:

The check boxes above are the new item type introduced in DotNetBar 6.0. You can use them on toolbars, ribbon control or on any other DotNetBar control that lets you add items to it.

Using containers you can create very rich menu layouts. For example using combination of vertical and horizontal container we create the Office 2007 style start menu pictured below:

Each container can also be styled through our ElementStyle class which you can use to specify gradient background, borders etc.

The real power though comes with the Text-Markup that all our buttons support. Text-markup lets you visually decorate menus and toolbars. Hard to visualize? Here is screenshot:

Notice how the text is structured for each item. Text-markup is small subset of HTML that we implemented. We designed that from ground up so it is efficient and it renders fast. That was one of the top requirements so you do not see any slow downs on menus or toolbars due to the rich rendering.


DotNetBar is an easy to use Windows Forms component for Visual Studio.NET 2005 that helps you create professional user interfaces with ease.
[tags]DotNetBar, VS.NET, Ribbon, Office 2007, Menus, Toolbars, Components, Visual Studio[/tags]

Professional looking applications made easy with DotNetBar for WinForms, Silverlight and WPF User Interface components. Click here to find out more.