Silverlight Date Picker
The Date Picker control provides a simple way to select a date and is similar to web aplication date pickers. Here we have a simple example showing how to declare a Date Picker in XAML and how to respond to date selection changes.
You need to login to Download the Date Picker example, If you do not have a login you can register for free!
How to Use the Date Picker Control
To use the Date Picker on your Silverlight page:
<UserControl x:Class="DatePicker.Page"
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:liquid="clr-namespace:Liquid;assembly=Liquid"
Width="400" Height="300">
<Canvas>
<liquid:DatePickerPlus x:Name="testPicker" Canvas.Left="10" Canvas.Top="10" Width="200" />
</Canvas>
</UserControl>
In your C# code behind file you can refer to the Date Picker using testPicker. The SelectedDate property contains the currently selected date.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace DatePicker
{
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();
}
}
}
Example Silverlight Date Picker Control:
Rate this:
1 Star
2 Star
3 Star
4 Star
5 Star
58 Ratings / 3.0 Average