开发者

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 :)


  1. For TimePicker control you need to reference the following dll:

    System.Windows.Controls.Input.Toolkit.dll

  2. Next, add the following namespace to XAML:

    xmlns:toolkitInput="clr-namespace:System.Windows.Controls;assembly=System.Window‌​s.Controls.Input.Toolkit"

  3. Now you can use the TimePicker control as:

    <toolkitInput:TimePicker Value="{Binding Model.ExecutionFrequencyStartTime, Mode=TwoWay}" />

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜