Windows Phone 下拉菜单

编程入门 行业动态 更新时间:2024-10-28 06:24:28
本文介绍了Windows Phone 下拉菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我看到 Windows Phone 工具箱中没有提供下拉列表/组合框.我可以看到必须有一种方法来创建一个,因为在手机的设置中,选择主题本质上是一个下拉菜单.

I see that there is not a dropdown/combobox offered in the windows phone toolbox. I can see that there has to be a way to create one because in the settings of the phone, choosing a theme is essentially a dropdown menu.

有谁知道我可以从哪里获得如何创建一个示例代码?我看过一些示例,但 xaml 看起来真的很长很复杂.创建这个控件真的有那么难吗?

Does anyone know where I can get sample code how to create one? I have seen a few samples, but the xaml seems really long and complicated. Is it really that difficult to create this control?

推荐答案

您可以使用 Silverlight forWindows Phone 工具包(您确实应该使用它).ListPicker 控件将执行您想要的操作.

You can use the Silverlight for Windows Phone Toolkit (You really should be using this). The ListPicker Control will do what you want.

这是一个关于如何使用它的深入教程:http://www.windowsphonegeek/articles/listpicker-for-wp7-in-depth

Here is an in-depth tutorial on how to use it: http://www.windowsphonegeek/articles/listpicker-for-wp7-in-depth

这是它的描述(来自 这里):

Here is a description of it (from here):

列表选择器

组合框在 WP7 中并不酷开发因此,请改用 ListPicker.两种格式可用.首先扩展到位,为您提供选择.对短列表很有用.第二带你到另一个页面完整列表框可供选择返回呼叫屏幕.你可以当您更改时,在 WP7 上看到这个正在使用设置/铃声 &声音.

Comboboxes just aren't cool in WP7 dev. So use the ListPicker instead. Two formats available. The first expands in place to give you options. Useful for short lists. The second takes you over to another page witha full listbox to choose from then returns to the calling screen. You can see this in use on WP7 when you change Settings / Ringtones & Sounds.

这篇关于Windows Phone 下拉菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-25 14:54:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1118557.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:菜单   Windows   Phone

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!