Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How create glossy button in C#? [closed]

I want create glossy buttons with GDI+ or Silverlight with C#, any ideas or trickery how to create a glossy button? Somethings like images below:

I am interesting more in GDI+ solutions.

http://i.stack.imgur.com/ZguQG.jpg

like image 234
hashi Avatar asked Jun 25 '11 17:06

hashi


People also ask

How do I create a button in C sharp?

Creating a C# Button To create a Button control, you simply drag and drop a Button control from Toolbox to Form in Visual Studio. After you drag and drop a Button to a Form, the Button looks like Figure 1. Once a Button is on the Form, you can move it around and resize it.


2 Answers

  • Creating Gel Buttons with Windows Forms : Part 1 (archive)
  • Creating Gel Buttons with Windows Forms : Part 2 (archive)
  • Creating Gel Buttons with Windows Forms : Part 3 (archive)

Chris Jackson, Microsoft Appcompat Guy, wrote that for .NET (i.e. C# and GDI+).

 

enter image description here
Windows Forms Gel Buttons : First Revision

 

enter image description here
Windows Forms Gel Buttons : Second Revision

 

enter image description here
Windows Forms Gel Buttons - Third Revision

All the code is there, along with careful consideration of

  • scaling with high dpi
  • performance and bitmap caching
like image 136
Ian Boyd Avatar answered Sep 28 '22 04:09

Ian Boyd


Example here:

This article demonstrates how to use the WindowsVistaRenderer and how it was created...

I've found different layers on the button drawing...

A glossy effect is drawn on the north of the button. The green color represents an almost transparent color...

Now, the order in which we draw these layers is critical. That order is:

  1. Outer border
  2. Button background color (if button is checked)
  3. Glossy effect
  4. Border
  5. Button fill glossy emphasis
  6. Inner border
  7. Glow
  8. Text and image of the button...
like image 32
Rebol Tutorial Avatar answered Sep 28 '22 06:09

Rebol Tutorial