Calendar Control In Silverlight 3 Application
In this article we will see all properties related to Calendar control.
Crating Silverlight Project
Fire up Expression Blend 3 and create a Silverlight Application. Name it as CalendarControlInSL3.
First things first, search with the keyword “calendar” in Asset Library and you will find the following results.
First we will start with Calendar Control, go ahead and add Calendar control to your Application.
The default properties for the Calendar are as follows:
If you see above we have a property called Display Mode. It has 3 modes such as:
- Month (By default)
If you change these modes it will look similar to the following:
If you look below the above property you will find another property called Selection Mode. This property helps the user to select based on the modes. Currently we have the following modes:
- Single Date (By default)
- Single Range
- Multiple Range
The following are the effected Calendar control in various selection modes:
Selection Mode: Single Range (You can use the Shift key to select a range or select by using your mouse)
Selection Mode: Multiple Range (Press and hold CTRL key to select Multiple)
Selection Mode: None (Even if you select any date it will deselected)
There is a property called SelectedDate, this property will make the Calendar select the given date when loaded.
There are two properties called DisplayDateEnd and DisplayDateStart. If you change it the display of the Calendar will be affected. Like, I have changed 1st of July to 31st of July.
Now there is another property called IsTodayHighlighted. By default it is Checked but if you don’t want the date to be highlighted you can uncheck it.
We have another property called FirstDayOfWeek. By default it is Sunday, based on your requirement you can change it your date. We have all the 7 days listed in this option.
That’s it you have explored about the Calendar Control in Silverlight 3. We will talk about Calendar Control and related to Calendar Control in my forth coming articles.