VSTO & .NET & Excel

June 4, 2009

Implement the Ribbon UI in Windows Forms

Filed under: .NET & Excel, .NET SQL Tester, VSTO & Excel — Dennis M Wallentin @ 6:45 pm

Some of us Excel developers like the Ribbon UI while others find it more difficult to work with it. No matter what we developers think about it exist a growing number of clients requiring that the Ribbon UI to be implemented in .NET based Excel solutions.

Microsoft offers no controls that can be used to implement any Ribbon UI solution so we are forced to decide which third-party controls package to be used.  Of cause, most large vendors, such as Component One et al, offer components that can be used but they can be rather expensive.  DotNetBar from DevComponents is an inexpensive controls package including controls for the Ribbon UI.  I have been using the package for a while in clients solutions. DotNetBar includes 47 controls whereof some controls allow us to create a Ribbon UI in Windows Forms. All controls that are shipped with DotNetBar are highly customized. The controls are also frequently updated and new versions of DotNetBar are released on a regular basis.

With the package a collection of relevant case studies are shipped, both in VB and in C#. A knowledgebase is available to the DotNetBar customers and I find it easy to use it and it also provides relevant links based on the search criterias. The knowledgebase can also be accessed via the help file. The help file describes, in a strictly technical way, the DotNetBat assembly and its namespaces.

The following screen shot shows DotNetBar Samples Explorer: 

DotNetBar4

Because I find the controls to be good, especially the Ribbon UI controls, I have decided to use them for the upcoming .NET version of my commercial tool for Excel, the SQL Tester. The following screen shots are from the alpha version of SQL Tester.NET and all controls in use are part of DotNetBar package. 

The following screen shot views the main Windows Forms for SQL Tester.NET in the VS IDE. In addition to use a Ribbon UI it also use a tabcontrol with two tabs. These tabs will be synchronized with the tabs in the Ribbon UI and therefore is hidden when the tool is being executed.

DotNetBar1

Next screen shot shows the code in use to synchronize the tabs in the tab control with the tabs in the Ribbon control:

CodeDotNetBar

Having access to a tab’s click event is something we miss when building native Ribbon UI solutions in Excel. With DotNetBar we have it available without the need to create any workaround. Initially it may take some time to get used to the controls and what they offer. In my experience I would like to say that the more time we put into learning the controls the more we can leverage them in our Windows Forms solutions.

The following two screen shots show when SQL Tester.NET is being executed and we switch between the tabs in the Ribbon UI solution.

DotNetBar2

DotNetBar3

Kind regards,
Dennis

About these ads

2 Comments »

  1. Wow, this looks impressive. And you are right, the pricing looks very reasonable.

    Another product that also looks very good is SandRibbon, which has Windows, WPF and Silverlight versions. (Here is a link to the Windows version: http://www.divil.co.uk/net/controls/sandribbon

    I have not tried it, nor the DotNetBar product that you have reviewed here, but they both look like very professional Ribbon controls, and appear to have similar pricing.

    Really nice review, here, Dennis, I am looking forward to being able to use controls like this some day… Hopefully soon!

    - Mike

    Comment by Mike Rosenblum — July 2, 2009 @ 9:11 pm

  2. Hej Mike,

    Thanks for Your kind words. Also thanks for the tip of SandRibbon control which I may take closer look into. However, I have spent considerable time to learn in more depth about the DotNetBar so I will stick to it.

    All the very best,
    Dennis

    Comment by Dennis Wallentin — July 4, 2009 @ 1:05 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Silver is the New Black Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 36 other followers

%d bloggers like this: