How to enable TimePicker in SIlverlight 4 Toolkit?
According to the Silverlight Toolkit开发者_StackOverflow中文版 website they have a TimePicker as Preview available.
I have installed the toolkit but don't get to see it. How do I activate the Preview controls like the TimePicker?
Many thanks,
If you don't see the TimePicker in your Toolbox, right-click, select "Choose Items" and add it manually. If you don't find it there, this means that the toolkit assemblies aren't registered correctly. What you can do is add a reference to them in your solution and access the controls directly. TimePicker is in System.Windows.Controls.Toolkit
namespace in System.Windows.Controls.Toolkit.dll
Hope this helps :)
For TimePicker control you need to reference the following dll:
System.Windows.Controls.Input.Toolkit.dll
Next, add the following namespace to XAML:
xmlns:toolkitInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
Now you can use the TimePicker control as:
<toolkitInput:TimePicker Value="{Binding Model.ExecutionFrequencyStartTime, Mode=TwoWay}" />
精彩评论