Click here to Skip to main content
15,446,336 members
Articles / Multimedia / GDI+
Posted 24 Mar 2006


122 bookmarked

AlphaGradientPanel, an extended panel

Rate me:
Please Sign up or sign in to vote.
4.63/5 (63 votes)
24 Mar 2006CPOL
A panel that has rounded borders, gradients, and transparency.

Image 1


This is a panel, first of all. Therefore, it has all the advantages of a panel, plus some nice little features.

Using the code

You'll just have to include the component in your toolbox and use it.

The only property that is a bit special is the Colors() property. It is a collection of items and has design-time visibility in the property grid. I'm still trying to achieve transforming the color name that appears in the property grid in a nice drawing... If anybody knows how that can be achieved, please, please, please, let me know ;)


  • Rounded corners (any one of them or all at the same time).
  • Gradients (from 2 to n colors, with some special effects).
  • Transparency (any color can be made transparent with an "Alpha" value between 0 and 255).
  • Borders, even with rounded corners, have a nice little border.
  • Image inclusion (position, opacity, size, grayscale, and padding).
  • Padding of the content, of the back, and of the docking.


  • Version 1.0.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Software Developer (Senior)
Switzerland Switzerland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

Questionimage alpha question Pin
bekiser1-May-13 7:23
Memberbekiser1-May-13 7:23 
SuggestionA few changes needed to get this to work in .Net 4 Pin
Jonathan_Collins6-Jun-12 22:55
MemberJonathan_Collins6-Jun-12 22:55 
GeneralMy vote of 2 Pin
Brad Barnhill6-Jan-12 16:49
MemberBrad Barnhill6-Jan-12 16:49 
GeneralMy vote of 2 Pin
Dave Kreskowiak8-Apr-10 6:37
mveDave Kreskowiak8-Apr-10 6:37 
QuestionIssue removing control from form(s) Pin
David Minder22-Dec-09 5:09
MemberDavid Minder22-Dec-09 5:09 
QuestionOver controls??? Pin
Member 247284813-Oct-09 9:53
MemberMember 247284813-Oct-09 9:53 
Generalfrustrating Pin
joe destefano8-May-09 11:45
Memberjoe destefano8-May-09 11:45 
GeneralRe: frustrating Pin
joe destefano8-May-09 11:59
Memberjoe destefano8-May-09 11:59 
GeneralRe: frustrating Pin
David Minder22-Dec-09 4:16
MemberDavid Minder22-Dec-09 4:16 
QuestionAdding an AlphaGradientPanel at runtime? Pin
SMothes29-Sep-08 4:38
MemberSMothes29-Sep-08 4:38 
AnswerRe: Adding an AlphaGradientPanel at runtime? Pin
Nicolas Wälti1-Oct-08 1:10
MemberNicolas Wälti1-Oct-08 1:10 
Questiontransparency over controls Pin
Fallakka13-Aug-08 23:06
MemberFallakka13-Aug-08 23:06 
GeneralTransparency problem Pin
zuraw13-Mar-08 4:06
Memberzuraw13-Mar-08 4:06 
GeneralRe: Transparency problem Pin
cdebel26-Feb-09 9:49
Membercdebel26-Feb-09 9:49 
QuestionException Pin
BBWicked31-Jul-07 23:46
MemberBBWicked31-Jul-07 23:46 
Generalsorry but :) Pin
deltadirac29-Jul-07 8:05
Memberdeltadirac29-Jul-07 8:05 
QuestionRemoving a color Pin
the-rpd1-Jul-07 5:20
Memberthe-rpd1-Jul-07 5:20 
GeneralNice control Pin
the-rpd26-Jun-07 9:38
Memberthe-rpd26-Jun-07 9:38 
GeneralRe: Nice control Pin
(Nick Waelti)28-Jun-07 0:11
Member(Nick Waelti)28-Jun-07 0:11 
GeneralRe: Nice control Pin
the-rpd28-Jun-07 6:40
Memberthe-rpd28-Jun-07 6:40 
GeneralUse in applications Pin
BryanTKinkel12-Jun-07 3:40
MemberBryanTKinkel12-Jun-07 3:40 
AnswerRe: Use in applications Pin
Nicolas Wälti12-Jun-07 3:55
MemberNicolas Wälti12-Jun-07 3:55 
GeneralRe: Use in applications Pin
BryanTKinkel13-Jun-07 4:29
MemberBryanTKinkel13-Jun-07 4:29 
GeneralRe: Use Commercial in applications Pin
Matt Lowrance26-Sep-07 6:39
MemberMatt Lowrance26-Sep-07 6:39 
GeneralRe: Use Commercial in applications Pin
Nicolas Wälti26-Sep-07 20:19
MemberNicolas Wälti26-Sep-07 20:19 

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.