Windows Phone 7 DatePicker gotcha

Posted by David Turner on Geeks with Blogs See other posts from Geeks with Blogs or by David Turner
Published on Fri, 10 Dec 2010 11:17:59 GMT Indexed on 2010/12/10 22:19 UTC
Read the original article Hit count: 453

Filed under:

The Silverlight Toolkit for Windows Phone adds some great extra controls for Windows Phone 7, one gotcha that I ran into was that the DatePicker Application Bar icons don’t show up unless you include them in your project. The problem is that your DatePicker ends up looking like this:

image

Tim Heuer mentions this in his blog post about the Silverlight Toolkit for WP7, and as he says, it is documented in the source code:

image4

So the problem is that the icons can’t be referenced from the Silverlight Toolkit Assembly, and the solution is that you have to add them to you project in the ‘well known’ / pre-defined location of a top level folder in your project called Toolkit.Content, and you must make sure to mark the icons with a Build Action of  ‘Content’ otherwise it wont work:

image

The result is that your DatePicker will now look like this:

image

© Geeks with Blogs or respective owner