is there a way to add a drop shadow to controls?
are there any controls out there with this feature?
is there a way to add a drop shadow to controls?
are there any controls out there with this feature?
There is in WPF if you can stretch to using that instead, I don't believe there is an alternative in Windows Forms due to the limited capabilities of GDI+.
This article might be of interest if you're after something simple (and for rectangular controls!)
You have to overwrite the CreateParams
property like this:
private const int CS_DROPSHADOW = 0x00020000;
protected override CreateParams CreateParams
{
get
{
// add the drop shadow flag for automatically drawing
// a drop shadow around the form
CreateParams cp = base.CreateParams;
cp.ClassStyle |= CS_DROPSHADOW;
return cp;
}
}