Click here to Skip to main content
15,906,708 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 153.1K   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
Paul Selormey12-Jun-07 17:06
Paul Selormey12-Jun-07 17:06 
JokeRe: good job but.... Pin
Sacha Barber15-Jun-07 1:19
Sacha Barber15-Jun-07 1:19 
GeneralRe: good job but.... Pin
Paul Selormey15-Jun-07 3:23
Paul Selormey15-Jun-07 3:23 
GeneralRe: good job but.... Pin
Sacha Barber15-Jun-07 5:05
Sacha Barber15-Jun-07 5:05 
GeneralRe: good job but.... Pin
Paul Selormey15-Jun-07 17:44
Paul Selormey15-Jun-07 17:44 
GeneralRe: good job but.... Pin
Sacha Barber17-Jun-07 21:19
Sacha Barber17-Jun-07 21:19 
GeneralRe: good job but.... Pin
Paul Selormey17-Jun-07 22:40
Paul Selormey17-Jun-07 22:40 
GeneralRe: good job but.... Pin
Sacha Barber18-Jun-07 0:04
Sacha Barber18-Jun-07 0:04 
Paul Selormey wrote:
For my current project, I have no choice - I give the users what they want and try
to be ahead of the competition (and that will mean supporting Flex, Silvelight,
WPF, PDF, JavaFX etc).


Sounds like a very interesting project.

Where are you based?

Ok as far as Silverlight vs Flash.

Flash has full OO action script that supports video, tweens, vector animation manipulation, XML parsing, IO handling. Basically it's very mature language these days.

Silverlight Alpha (the one out now) is Javascript only object model, no .NET CLR support at all. So you simply can't compare the functionality available with Silverlight Alpha with Flash. Flash wins hands down. As I prefer Action script to javascript any day of the week. From what we saw of Silverlight Alpha, its was just quite clunky and didnt look that usable, Mike Ormond (MSFT man, kept saying cant do this at this version, but next one youll be able to). Flash on the other hand is easy to use, loads of resources tutorials available, right now.

Silverlight Beta (1.1 apparently) will have CLR support, but will run in a sandbox, basically a safe cutdown CLR enviroment, it remains to be seen just what will and wont be allowed. If Microsoft go completely security mad, they could end up with something like a Java Applet, which is very very limited, perhaps too limited for most interesting apps. If they open the security too wide, theyll end up with something that could do activeX type activities, such as delete or create files. This could be bad for a internet user. Remember Microsoft have released a plugin that stops ActiveX until the user confirms they are allowed for the given page. This is their own technology being stopped by them. Thats bad.

I just think at this moment in time Flash is the better system, its model just works.

Like I say I think, WPF proper, is totally different, and seems fairly mature already. Silverlight just doesnt seem ready yet.

But if you want to be ahead of the game, go for it.

Anyways thats just my opinion, who am I to say.



Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?

My Blog : sachabarber.net

GeneralRe: good job but.... [modified] Pin
Paul Selormey18-Jun-07 0:40
Paul Selormey18-Jun-07 0:40 
GeneralRe: good job but.... Pin
Sacha Barber18-Jun-07 1:23
Sacha Barber18-Jun-07 1:23 
GeneralRe: good job but.... Pin
Paul Selormey18-Jun-07 3:10
Paul Selormey18-Jun-07 3:10 
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 

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.