Monday, July 13, 2009

Month UPDown Control In Silverlight 3


This is a Custom Control that I have created, this is my first control. What this control will do? I guess this is very simple; it will just change the Month name on button up or down.
In our Sample Application we will just demonstrate how to use it.

Create a Silverlight Project


Figure 1.1 Creating Silverlight Project

Designing the Application

Here is an idea; we will have two buttons up and down, and one text box which will carry the text. I have used Blend 3 to design this. First I have created a path (using the Pen Tool) a triangle and made a copy of it so that I can use it for its reverse side.


Figure 1.2 Creating Triangle using Pen Tool

Then I Converted the Path into Buttons, and made two Buttons out of it; Up Button and Down Button. They will look similar to the following.


Figure 1.3 Up and Down Button

Adding a TextBox Control

Adding a text box is not that tough but I have made some changes to look familiar with the control. The following xaml code for the whole design will help you.

See full detail:

No comments: