Click here to Skip to main content
15,881,281 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 150.8K   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

 
GeneralRe: good job but.... Pin
Sacha Barber18-Jun-07 21:25
Sacha Barber18-Jun-07 21:25 
GeneralRe: good job but.... Pin
Sacha Barber5-Jun-07 21:21
Sacha Barber5-Jun-07 21:21 
GeneralRe: good job but.... Pin
Juan Pablo G.C.6-Jun-07 6:19
Juan Pablo G.C.6-Jun-07 6:19 
GeneralRe: good job but.... [modified] Pin
Sacha Barber6-Jun-07 21:28
Sacha Barber6-Jun-07 21:28 
GeneralPoor Chris Pin
Muammar©4-Jun-07 20:43
Muammar©4-Jun-07 20:43 
GeneralGreat component! Pin
Nick__J4-Jun-07 20:32
Nick__J4-Jun-07 20:32 
GeneralRe: Great component! Pin
Juan Pablo G.C.4-Jun-07 20:37
Juan Pablo G.C.4-Jun-07 20:37 
QuestionRe: Great component! Pin
Nick__J4-Jun-07 20:58
Nick__J4-Jun-07 20:58 
AnswerRe: Great component! Pin
tec-goblin4-Jun-07 23:49
tec-goblin4-Jun-07 23:49 
GeneralRe: Great component! Pin
Pete Goodsall12-Jun-07 4:55
Pete Goodsall12-Jun-07 4:55 
GeneralPor favor, como puedo contactar contigo Pin
Fco. Javier Marin4-Jun-07 12:57
Fco. Javier Marin4-Jun-07 12:57 
GeneralRe: Por favor, como puedo contactar contigo Pin
ETA6-Jun-07 0:54
ETA6-Jun-07 0:54 
GeneralRe: Por favor, como puedo contactar contigo Pin
Fco. Javier Marin6-Jun-07 1:37
Fco. Javier Marin6-Jun-07 1:37 
GeneralGood job, mybe a way to improve: Pin
CodeMan4-Jun-07 5:15
CodeMan4-Jun-07 5:15 
GeneralRe: Good job, mybe a way to improve: Pin
Ray Cassick10-Jun-07 12:33
Ray Cassick10-Jun-07 12:33 
GeneralHorizontally stretched icons Pin
Paolo Vernazza4-Jun-07 1:15
Paolo Vernazza4-Jun-07 1:15 
GeneralRe: Horizontally stretched icons Pin
Juan Pablo G.C.4-Jun-07 1:28
Juan Pablo G.C.4-Jun-07 1:28 
GeneralRe: Horizontally stretched icons Pin
Paolo Vernazza4-Jun-07 3:54
Paolo Vernazza4-Jun-07 3:54 
GeneralRe: Horizontally stretched icons Pin
Praded5-Jun-07 22:29
Praded5-Jun-07 22:29 
QuestionIcons Pin
salsafyren23-Jun-07 21:45
salsafyren23-Jun-07 21:45 
NewsPossible MS issue Pin
MPROCTOR3-Jun-07 17:36
MPROCTOR3-Jun-07 17:36 
GeneralRe: Possible MS issue Pin
fwsouthern3-Jun-07 18:35
fwsouthern3-Jun-07 18:35 
GeneralRe: Possible MS issue Pin
Juan Pablo G.C.3-Jun-07 20:05
Juan Pablo G.C.3-Jun-07 20:05 
GeneralRe: Possible MS issue Pin
leppie4-Jun-07 0:01
leppie4-Jun-07 0:01 
AnswerRe: Possible MS issue Pin
The Cake of Deceit18-Apr-08 4:49
The Cake of Deceit18-Apr-08 4:49 

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.