Follow the easy steps below to create your solution.
Start your Visual Studio 2005 IDE.
Choose Create Web Site from the menu.
In this sample application we will use the Visual Basic language for the
the solution DropShadowSample.
Choose ASP.NET AJAX Control Toolkit Web Site.
Choose File System in the location box.
Click OK to create the project.
Visual Studio 2005 will create your project with a Default.aspx
page and likely a readme.txt. Go ahead and get rid of the latter file.
Open Default.aspx page in design view.
noticed that there is a control on the page already called script manager.
(Well, AJAX is really a script based implementation of the language
ASP.NET AJAX pages. By default, the Script Manager control registers the script
for the Microsoft AJAX Library with the page. This enables client script to use
the type system extensions and to support features such as partial-page
rendering and Web-service calls.
drag one panel from the standard Toolbox, in design mode select the panel and
make the background color as yellow and foreground color to black.
the panel, write some content as you like.
you run your sample now, you will find that there is a rectangle with your text
us add some elegance to it. Drag a DropShadow control from your AJAX toolkit and drop it on the default page.
the properties of the extender, choose the target control ID to be panel1.
you run the sample again, you will get a nice shadow around the panel.
make your life more beautiful, let us take a look at some of the properties of
this extender. Select the panel in the properties window and take careful look
at the new additional property group called DropShadow Extender.
opacity of the drop shadow (not the panel), is from 0 (fully transparent) to
1.0 (fully opaque). The default value is 1. This is a percentage value where 0
means no shadow and1 means black shadow. You can go and experiment by setting
values like 0, 0.25, 0.5 and 0.75.
Rounded property is set to true to set rounded corners on the target (the
panel) and the shadow. Default is false. However, I regard it as nice to add.
radius is also a very nice feature that would make your panel looks more like
an egg shape than a rectangle. The more you increase this value, the more the
egg-like shape is achieved. The default value is 5.
Track Position is set whether or not the drop shadow should track the position
of the panel it is attached to. Use this if the panel is absolutely positioned
or will otherwise move.
but not least is the width property that specifies the shadow width in pixels.
The default value is 5. Go experiment and change the value.