So with the new update of the Silverlight tookit for WP7 there came along  a few new controls for us developers to play around! I chose the DatePicker-Control for this blogpost, cause it`s not that easy to implement it correctly in some ways and to give some answers for beginners.

Step-by-Step:

  • First of all, download the toolkit from CodePlex and place it on your harddrive. 🙂
  • Don`t forget to add a reference to Microsoft.Phone.Controls.Toolkit for your WP7-Project.
  • Open up your XAML of the appropriate PhoneApplicationPage in VisualStudio, where you want to implement the DatePicker-Control
  • Add the Namespace to your Page…

  • Using the Control on the page…

  • Now start your project for a first test. After clicking of the control, you you should see the following…

  • You will be presented a page for picking the date, like in the calendar-app, BUT this is no PhoneApplicationPage one hast access to!! I marked the buttons in the ApplicationBar. To fix this issue, so you have a “check” and a “cancel”-icon, you have to add a folder to your project called Toolkit.Content!
  • Now you have to add from your icons the ApplicationBar.Cancel.png and the ApplicationBar.Check.png to the folder.
  • The DatePicker control searches for exact this Folder with these two files!
  • After this, you`re done and it should look like this…

Have fun 🙂

Its been busy weeks since the last Developer Roundup, but nethertheless here are the “new” Links 🙂

 

Unit Converter Starter Kit WP7 (MSDN)

Gesture Service in depth (Windows Phone Geek)

Using Visual Studio to build VB WP7-Applications (VS Team Blog)

Using WCF on WP7 – walkthrough (Andy Pennell)

http://www.yourWindowsphone7.com (New Community and Forum)

Beginners guide SpriteBatch class for XNA & WP7 (EXHD)

How to implement Basic HTTP Authentification in WCF on WP7 (C is for Coder)