自定义号码选择器? [英] Custom number picker?

查看:184
本文介绍了自定义号码选择器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种简单的方法可以使Windows Phone 7的数字选择器类似于时间选择器控件?我想自定义范围为0-99:0-59. 0-9. Google,Bing和msdn似乎对此主题的信息含糊不清.

Is there an easy way to make a number picker for windows phone 7 that is similar to the timepicker control? I want go have custom ranges of 0-99 : 0-59 . 0-9. Google, bing, and msdn seem to be very vague with information on the subject.

我找到了一篇文章,确切地描述了我想做的事情这里.现在,我的问题是该文章很旧,如果我键入工具箱:在我的XAML代码中,没有建议使用loopingselector.如果我进入工具箱,请右键单击并选择项目.没有用于loopingselector或无限列表选择器的控件.

I found an article that describes exactly what I want to do here. Now my problem is that the article is old and if I type toolkit: in my XAML code, no suggestion comes up for a loopingselector. If I go into my toolbox, right click, choose items. There are no controls for a loopingselector or infinite list selector.

源代码也不起作用.它在XAML文件中给出了许多我无法纠正的错误.

The source code also doesn't work. It gives a bunch of errors in the XAML file that I am unable to remedy.

我有点不知所措.

我正在使用Visual Studio 2010/c#4.0.

I am using Visual Studio 2010 / c#4.0.

预先感谢

推荐答案

确保使用正确的名称空间. LoopingSelector位于 Microsoft.Phone.Controls.Primitives 命名空间中.因此,您的 xmlns 应该类似于:

Make sure that you are using the right namespace. LoopingSelector is in Microsoft.Phone.Controls.Primitives namespace. So your xmlns should be something like:

xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit"

这篇关于自定义号码选择器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆