Glassy Buttons In Silverlight 3

No.of Views600
Bookmarked0 times
Downloads 
Votes0
By  dpatra   On  16 Feb 2010 00:02:00
Tag : Silver Light and XAML , How to
Glassy Buttons In Silverlight 3
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

In Silverlight 3 we have normal Button control. For some site or project requirements it needed to be a glassy look. In this article I am going to show you how easy it is to make Glassy Buttons.

Creating a Simple Silverlight Application

Open up Blend 3 and Create a new Silverlight Application.

Image Loading...

1) Select the Rectangle tool from the Tools Pane and draw a Rectangle of your desired size.

Image Loading....

Image Loading...

I have just changed the Rectangle’s Fill Property as Gradient Fill and Changed the RadiusX and RadiusY properties of Value 15 each. And the StrokeThickness to Value 3.

Image Loading....

Image Loading...

2) Now copy the Rectangle and Paste it over the Rectangle. (We will call the Copied Rectangle as Old Rectangle and the newly pasted as New Rectangle)

3) Transform the New Rectangle to a smaller size.

Image Loading...

4) Remove the Stroke from the New Rectangle.

Image Loading...

5) Change the Gradient to White on both sides for the New Rectangle.

Image Loading....

6) On the Right side of the Gradient Brush change the Alpha to Value 0.

Image Loading...

7) Now resize the New Rectangle to fit to the Old Rectangle.

image loading...

8) Now select both the Rectangles and group it into Grid from the selected Menu.

Image Loading...

9) Now select the Grid and Right Click on it and select Make it Into Control from the menu Selected.

Image Loading...

10) Now Choose Button from the Asset Gallery and name it as MyButtonStyle.

Image Loading....

Now you have created the Button, a Content Presenter is added.

Image Loading...

Now you can go through my article States Animation In Silverlight 3 to change the states of this Glassy Button.Enjoy Animating.

Thank you


About the Author


Diptimaya Patra

Description :I am a Master in Computer Application (MCA) from SRM University, Chennai. I am MCTS in ASP.Net Web Development, and MOSS 2007 Administration. I have extreme exposure to Microsoft Technologies in recent times like Silverlight 2, Silverlight 3. I am from Cuttack, Orissa. You can reach me using this mail (diptimaya.patra@gmail.com). Currently I am working as a Software Engineer in UST Global Inc in Trivandrum Center.

Occupation :Software Engineer
Company : UST Global.
Location : India
Follow me at twitter : http://twitter.com/dpatra


 
Sign Up to vote for this article
 
About Author
 
dpatra
Occupation-Not Provided
Company-Not Provided
Member Type-Expert
Location-Not Provided
Joined date-13 Jul 2009
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top