/default.aspx
Silverlight .NET CMS and Controls
Home
/controls.aspx
Silverlight Controls
Controls
Date Picker

Silverlight Date Picker

This Silverlight only Date Picker is easy to implement on your Silverlight driven website and is also customizable to provide a visual feel suitable for any site design.

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:DatePicker 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 Date Picker can be configured to pick just the date or the date and time through the use of drop down lists.

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:

Silverlight Date Picker Control

Your Comments and Questions Answered

 You are not logged in. You need to login to post new messages, if you do not have a login you can register for free!

dan May, 28 2008 - 04:50

Hello,

This has been reported as a bug and a fix is on the way in the next version, thanks for reporting this!

 

jmcfet May, 27 2008 - 14:06

How to you set the DateControl to a specific date other than the DateTime.Now?

is there a way to have the text portion of the control set to this value as it after a new date is selected?

 
This page is 17.81KB and was generated by the SilverPages CMS in 0.046 seconds. Total impressions: 580.