Windows Phone 7 DatePicker gotcha
- by David Turner
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:
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:
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:
The result is that your DatePicker will now look like this: