Click here to Skip to main content
15,889,315 members
Articles / Programming Languages / C#
Article

The new RibbonForm, RibbonRoundButton, and FastMenu

Rate me:
Please Sign up or sign in to vote.
4.41/5 (59 votes)
3 Jun 2007CPOL2 min read 151.6K   5.2K   157   76
A free version of RibbonForm, RibbonRoundButton, and RibbonFastMenu.

Screenshot - RibbonTest.png

Introduction

In this article, I present the RibbonForm, RibbonRoundButton, and RibbonFastMenu as a release version. I present RibbonContextMenu as a preview version because I have to improve some parameters to work with it well.

The Controls

RibbonForm 1.0

Screenshot - RibbonForm.png

The RibbonForm was a bit difficult to design due to it being a modeless window, and I had to implement all the resizing and window moving by myself. Also, I had to implement a HSB method to change colors.

Properties

The RibbonForm has these properties:

  • CompB: To change the Brightness of the Form with a value that I recommend to get from the RibbonFormSample (see screenshot above).
  • CompS: To change the Saturation of the Form, the same as above.
  • CompH: To change the Hue of the Form, the same as above.
  • TextSection: It's the subtitle of the Form with the harmony color.

How to use

In a new Windows application, add an existing item from the Solution Explorer, and choose the RibbonForm.cs (it adds the other files needed). Now, in the Form1.cs code, change to this:

C#
using RibbonStyle; //To add the NameSpace

namespace RibbonTest
{
    public partial class Form1 : RibbonForm //To inherit from RibbonForm
    {
        public Form1()
        {
            InitializeComponent();
        }
    }
} 

RibbonRoundButton 1.0

Screenshot - RibbonRound.png

It was really hard to design a vectorial round button with fading, but I think it finished well.

Properties

The RibbonRoundButton has these properties:

  • ColorBase, ColorOn, ColorPress: The typical colors.
  • ColorStroke: Is the border of the button.
  • ImgOffset: You can move the image from topleft to rightdown.
  • ImgScale: You can scale the image from 1 to 100.

How to use

You can choose two options: as other buttons, you can add the DLL in Class_RibbonRoundButton, or you can add an existing item in the Solution Explorer and choose RibbonRoundButton.cs, then recompile and add the button to the Form.

RibbonFastMenu 1.0

It's the form that appears when you click on the MenuButton on the top-left. This Form has the typical app options.

I have to implement a SetHSB() method to change the colors, but it is functional.

How to use

In a Windows application, choose Add Existing Item, and select the RibbonFastMenu.cs. I recommend adding all the existing resources from the RibbonTest app to have all the images, and then you will have a Form like in the first image of the article.

Comments

I'm designing a better way to use the RibbonContextMenu because I think it's a bit difficult to use, but please be patient till I finish it.

Keep in mind

  • I have to add the SetHSB() method to the FastMenu.
  • Make a better way to implement the FastMenu.
  • Make a stable version of the RibbonContextMenu.

History

  • June 2007 - RibbonForm 1.0, RibbonFastMenu 1.0, RibbonRoundButton 1.0.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Expediteapps
Spain Spain
I'm Electronic Engineer, I did my end degree project at Astrophysical Institute and Tech Institute. I'm HP Procurve AIS and ASE ,Microsoft 3.5 MCTS
I live in Canary Islands ,developing customized solutions

Deeply involved in Xamarin Forms LOB (including Azure Cloud with offline support, custom controls, dependencies) projects, WP8.1 & W10 projects, WPF modern styled projects. Portable libraries like portablePDF, portableOneDrive, portableReports and portablePrinting (using Google Printing API).


Web and apps showcase at:
Expediteapps


Take a look to my blog
Blog

Comments and Discussions

 
AnswerRe: Possible MS issue Pin
The Cake of Deceit18-Apr-08 4:49
The Cake of Deceit18-Apr-08 4:49 
GeneralRe: Possible MS issue Pin
Marco Mastropaolo3-Jun-07 20:56
Marco Mastropaolo3-Jun-07 20:56 
GeneralRe: Possible MS issue Pin
salsafyren23-Jun-07 21:42
salsafyren23-Jun-07 21:42 
GeneralRe: Possible MS issue Pin
Rudolf Jan4-Jun-07 0:03
Rudolf Jan4-Jun-07 0:03 
GeneralRe: Possible MS issue Pin
salsafyren24-Jun-07 0:58
salsafyren24-Jun-07 0:58 
GeneralRe: Possible MS issue Pin
Ray Cassick10-Jun-07 12:54
Ray Cassick10-Jun-07 12:54 
GeneralRe: Possible MS issue Pin
leppie4-Jun-07 0:08
leppie4-Jun-07 0:08 
GeneralRe: Possible MS issue Pin
MPROCTOR4-Jun-07 13:43
MPROCTOR4-Jun-07 13:43 
As I said I am sure most developers here aren't developing huge commerical software, most would be developing small applicaitons for fun, their company they work for or their home business.

It was just that microsoft don't want people to use the ribbon in their applications if it doesn't work the microsoft way. Funnily enough there is a good reason for this, as you could imagine spending bucket loads on making this new interface, then ABC Company comes along and releases their accounting package that "looks" like Office 2007. If people then went to customise the ribbon in the accounting package but didn't have any customise option when right click, they mightn't think to do it in Office 2007. They might hover over a button to get some tooltip and find nothing, and all the other hooha that Microsoft put into Office 2007 UI.

Microsoft want the functionality to work the same independent on what software you are using, and of course the catch is if you are making an Office "competitor" you cannot emulate the ribbon as they want to be the only boys in the Ribbon UI sandbox that does an office product. Smile | :)

Toolbars are different, Microsoft as we know have tried about 3-4 different kinds of toolbars, with different appearances and functionality, however the Toolbar stems from days of Macintosh and couldn't really be held as their IP.

IP and Patents are close to the same except one is a formal registered IP whereas the other is a "virtual" patent. If there wasn't a patent on the UI and someone developed a Ribbon UI near identical to Microsoft, Microsoft still could sue that person as "copying" their property and would have full legal support, with a patent it is like locking that IP into stone and ensuring no other company can state they had that design first (basically first in best dressed). Most countries have mutual understanding when it comes to Patents and IP, so just because they are a US Patent I wouldn't try and hide under your country, Microsoft have big hand and can lift countries quite easily (some of them anyway Smile | :) )

So yes your control is free however, unless your willing to follow Microsoft design guide, it wouldn't surprise me if Microsoft asked you politely to either follow it or cease developing it.

Sorry to be a worry wart, its up to you buddy, I'm all for people taking the challenge to emulate someones design but in this case might be a slippery slope.




cheers,

Michael Proctor

GeneralRe: Possible MS issue Pin
tec-goblin4-Jun-07 23:47
tec-goblin4-Jun-07 23:47 
GeneralHmmm Pin
The_Mega_ZZTer3-Jun-07 11:53
The_Mega_ZZTer3-Jun-07 11:53 
GeneralWonderful Pin
Fco. Javier Marin3-Jun-07 11:24
Fco. Javier Marin3-Jun-07 11:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.