Monday, November 23, 2009

Windows 7 Ribbon for WinForms – Yes you can…

CodePlex - Windows Ribbon for WinForms

Project Description

Windows Ribbon for WinForms is a .NET wrapper for Windows 7 Ribbon control. It will allow WinForms developers to use Microsoft Windows 7 Ribbon control in their WinForms applications.

The project includes the library RibbonLib, which adds support for Windows Ribbon to WinForms application and sample applications that demonstrates the use of the library and the different Ribbon features available.

Check my blog for more details on how to use the windows ribbon at http://blogs.microsoft.co.il/blogs/arik/

Note: you must have the Windows 7 SDK installed in order to compile the project.

Following is the list of sample application and their description:

  • 01 - AddingRibbonSupport - Empty WinForms application with basic Ribbon support.
  • 02 - ApplicationMenuButton - WinForms application with Ribbon that contains an application menu with some buttons.
  • 03 - MenuDropDown - WinForms application with DropDownButton and SplitButton inside an application menu.
  • 04 - TabGroupHelp - WinForms application that uses Tabs, Groups and HelpButton.
  • 05 - Spinner - WinForms application that demonstrates the use of a Spinner control in the ribbon.
  • 06 - ComboBox - WinForms application that demonstrates the use of a CombBox control in the ribbon.
  • 07 - RibbonColor - WinForms application that shows how to change the ribbon global colors.
  • 08 - Images - WinForms application that shows how to work set images dynamically in the ribbon.
  • 09 - Galleries - WinForms application thats uses DropDownGallery, SplitButtonGallery and InRibbonGallery.
  • 10 - CheckBox - WinForms application that uses CheckBox and ToggleButton control in the ribbon.
  • 11 - DropDownColorPicker - WinForms application that demonstrates the use of a DropDownColorPicker control in the ribbon.
  • 12 - FontControl - WinForms application that demonstrates the use of a FontControl control in the ribbon.
  • 13 - ApplicationModes - WinForms application that demonstrates the use of ApplicationModes.

[GD: Project Description Leached in Full]

Arik Poznanski's Blog - Windows Ribbon for WinForms, Part 16 – ApplicationModes

Windows Ribbon for WinForms library now supports Application Modes.
The result of this post is a yet another sample, “13-ApplicationModes”, found on the project site.

image_1C9179B1

image_683F9581 

What are application modes?
It is best to explain using examples. Applications some times have different “modes” in which they show different GUI, for example:

  • Simple mode VS Advanced mode
  • Regular editor mode VS Print mode

The ribbon framework support changing its GUI according to the current application mode. In order to use the ribbon application modes you need to:

  • Set the available application modes for each ribbon item. This is done in design time.
  • Set the current application mode. This is done in run time.

To summarize, application modes is a feature that allows the ribbon to change its GUI according to the current application context.

…”

While you’re there, make sure you check out the other posts in the series;

Windows Ribbon for WinForms, Part 1 – Introduction
Windows Ribbon for WinForms, Part 2 - Basic Ribbon Wrapper
Windows Ribbon for WinForms, Part 3 - First WinForms Ribbon Application
Windows Ribbon for WinForms, Part 4 - Application Menu with Buttons
Windows Ribbon for WinForms, Part 5 - Application Menu with SplitButton and DropButton
Windows Ribbon for WinForms, Part 6 – Tabs, Groups and HelpButton
Windows Ribbon for WinForms, Part 7 – Spinner
Windows Ribbon for WinForms, Part 8 – ComboBox
Windows Ribbon for WinForms, Part 9 – Changing Ribbon Colors
Windows Ribbon for WinForms, Part 10 – Working With Images
Windows Ribbon for WinForms, Part 11 – DropDownGallery, SplitButtonGallery and InRibbonGallery
Windows Ribbon for WinForms, Part 12 – CheckBox and ToggleButton
Windows Ribbon for WinForms, Part 13 – DropDownColorPicker
Windows Ribbon for WinForms, Part 14 – FontControl
Windows Ribbon for WinForms, Part 15 – Use Ribbon as External DLL

 

Yeah, I know, WinForms? Isn’t WinForms dead?

Well, there’s dead and there’s dead. While WinForms gets no loving in .Net 4, that doesn’t mean it doesn’t have its place or that there aren’t tens of thousands of developers using it every day. And while there are third party vendors who have had Ribbons for while now (I’ve used Infragistics’ Ribbon at work for a few years now) I thought it cool to see the Win7 native Ribbon being wrapped and made available.

Why? Because I may want to develop WinForm apps using the Ribbon that are open source. And that’s hard to do (open sourcing it) if you’re using a commercial component. That and I just like seeing Win7 goodness being made usable in my Managed world…  ;)

No comments: