Custom number picker?

冷暖自知 提交于 2019-12-10 22:40:37

问题


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.

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.

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

I am kind of at a loss on what to do here.

I am using Visual Studio 2010 / c#4.0.

Thanks in advance


回答1:


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"


来源:https://stackoverflow.com/questions/7210480/custom-number-picker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!