I've had an odd problem with a TimePicker. Another user has reported
something similar in the Silverlight forum.
The error is: "XamlParseException - The type 'TimePicker' was not found."
I re-created the problem by following a series of steps:
creating a new Silverlight Application project and adding a TimePicker to the MainPage.xaml - failed to recreate
created a UserControl in the application in a Views folder, moved the TimePicker to it, added the UserControl to the MainPage.xaml- failed to recreate
Added the Prism references (V4drop8) to the project and turned MainPage.xaml into Shell.xaml, adding a Bootstrapper.cs as per the standard instructions and poiting App.xaml.cs at the bootstrapper. I hadn't added any regions or modules- failed to recreate.
I added a module to the solution, gave the shell project a reference to it and it a ref to Prism., Created a Views folder, moved the UserControl with the TimePicker to the Views folder and changed the namespace to match the module project. Then I created
a region in the shell.xaml (using a tabcontrol) and told the module to stick the UserControl in the mainregion. Recreated the problem.
In both my actual project and my recreating-the-problem project, the TimePicker had been dragged off the Toolbox and had the xmlns:toolkit namespace applied. In both, I've added the xmlns:swcit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
namespace and changed the TimePicker line to point to that.
The error now becomes (in both projects):
XamlParseException - The type 'TimePicker' was not found because 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit' is an unknown namespace.
In my acual project (but not in my recreation) the latter error can be resolved by adding a Name attribute, e.g.
just as with the other guy. I haven't reported this as an issue because I can't see how it's a problem with Prism but it only manifests itself in a Prism region.