开发者

How create glossy button in C#? [closed]

开发者 https://www.devze.com 2023-03-15 04:37 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this po
Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 6 years ago.

Improve this question

I want create glossy buttons with GDI+ or Silv开发者_如何转开发erlight with C#, any ideas or trickery how to create a glossy button? Somethings like images below:

I am interesting more in GDI+ solutions.

How create glossy button in C#? [closed]


  • 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+).

 

How create glossy button in C#? [closed]


Windows Forms Gel Buttons : First Revision

 

How create glossy button in C#? [closed]


Windows Forms Gel Buttons : Second Revision

 

How create glossy button in C#? [closed]


Windows Forms Gel Buttons - Third Revision

All the code is there, along with careful consideration of

  • scaling with high dpi
  • performance and bitmap caching


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...


In Silverlight it's very simple to create this buttons in Xaml with brushes.
See this link for some good samples: Glossy Brushes using Radial Gradient Brush in WPF

You can also use Microsoft Expression Design to create these buttons or simply import from Adobe Illustrator or Adobe Photoshop and then export them to Xaml.


You can also check this CodeProject article, a nice tutorial shows how to make some glossy circular buttons in expression blend: Glass Orb Button in Silverlight

Also there are lots of projects related to glass buttons and glossy effects made using GDI+ or expression blend in codeproject.


You can also use Expression Blend.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号