Bug Report: Calendar control

Mar 18, 2009 at 6:49 PM
I have uncovered what I believe is a bug in the Calendar control. I suspect this one is known, but I'll pass it along anyway.

Behavior: VS 2008 compiler throws following error when an unnamed calendar is loaded:

Cannot find type 'Microsoft.Windows.Controls.Calendar'. The assembly used when compiling might be different than that used when loading and the type is missing.  Error at object 'System.Windows.Controls.Grid' in markup file 'MyUserControl.xaml' Line 15 Position 10.

Steps to reproduce: Add a calendar to a UserControl from the VS 2008 toolbox. Delete the 'name' attribute. Hit F5. Error will occur. Reinstate 'name' attribute. Control will load.
Mar 18, 2009 at 8:06 PM
Dragging the calendar off the Toolbox onto the design surface may not be adding the assembly reference to the project. Try adding an assembly reference to WPFToolkit.dll manually and see if that solves the issue.