如何获得像闹钟中显示的那种列表选择器?
如何创建大型滚动列表选择器,例如为 WP7 默认闹钟上使用的 datePicker 和 timePicker 创建的类型?其余的列表选择器没有完全相同的效果。我只会使用列表选择器来选择整数值。
谢谢
How do you create the big, scrolling list picker, like the kind that is created for datePicker and timePicker which is used on the WP7 default alarm clock? The remaining list pickers don't have quite the same effect. I would be using the list pickers only to choose integer values.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DatePicker
和TimePicker
是 Silverlight Toolkit for WP7 提供的控件。他们实际上所做的是将选择显示在页面的一个控件中,然后导航到一个单独的页面,允许您实际选择新的日期/时间。在这些单独的页面中,他们使用一组LoopingSelector
控件(每个项目一个),使用户能够选择日期/时间的部分。如果您想显示类似的选择器,但对于数值,则需要实现相同的基础结构,但使用单个 LoopingSelector ,并且需要提供正确的数据源(实现 ILoopingSelectorDataSource 接口),指定控件的值。
WindowsPhoneGeek.com
The
DatePicker
andTimePicker
are controls that are provided by the Silverlight Toolkit for WP7. What they actually do is present the selection in one control in your page, then navigate to a separate page that allows you to actually select a new date/time. In these separate pages they use a collection ofLoopingSelector
controls (one per item) that enable the user to select the parts of the date/time.If you want to display a similar picker but for numeric values, then you need to implement the same infrstructure but using a single
LoopingSelector
and you need to provide the correct data source (that implements theILoopingSelectorDataSource
interface) that specifies the values for your control.There is a great series of 3 posts on the
LoopingSelector
on WindowsPhoneGeek.com