Click here to Skip to main content
15,880,392 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.7K   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, 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 
After reviewing your comments & links, this almost seems appropriate for an article by itself -- cautions before launching your latest MS clone .....
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 
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 
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.