在 Windows Phone 工具包列表选择器中不选择任何项目 [英] Make no item selected in windows phone toolkit list picker

查看:22
本文介绍了在 Windows Phone 工具包列表选择器中不选择任何项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 WP7 工具包中的 ListPicker 控件.我想最初显示没有选择任何项目的列表.有没有办法做到这一点?

I'm using the ListPicker control from the WP7 Toolkit. I want to initially present the list with no items selected. Is there a way of doing this?

推荐答案

根据 此博客条目 列表选择器与总是有一个主动选择"的想法.

According to this blog entry List Picker works with the idea of "there is always an active selection".

我将遵循的方法是将列表中的第一项设为未选择项"项.使用您稍后可以识别的适当值(可能是空 ID).

The approach I would follow is to have the first item in the list be you "no selected item" item. With appropriate values (maybe a null id) that you can identify later on.

这篇关于在 Windows Phone 工具包列表选择器中不选择任何项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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