【发布时间】:2012-05-15 13:30:00
【问题描述】:
在我的 windows phone7 应用程序中,我必须使用类似于下拉列表控件的控件。所以我遇到了提供 WP7 工具包程序集的 ListPicker。
我遇到的问题是,它与页面中的其他元素重叠。以下是界面截图。
当我单击 ListPicker 时,它会展开列表并允许我从中选择一项。但是当我选择一个项目时,它会单击出现在该项目下方的按钮。我可以做ExpansionMode="FullScreenOnly",但它会进入全屏模式,因为列表选择器只有 3 个项目,这不是我想要的方式。
有谁知道我可以让 ListPicker 展开并从中选择一个而不会单击位于其下方的按钮的任何方法。
编辑
我已安装 WP7 Tool kit for Silverlight 并将 dll 作为参考添加到项目中 Microsoft.Phone.Controls.Toolkit
XAML--->
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
<toolkit:ListPicker Name="listPicker1"/>
【问题讨论】:
-
嗨,谢谢保罗。我刚刚添加了 XAML 部分。在页面加载中为 ListPiclker 提供 ItemSource 作为列表(List
country)[listPicker1.ItemsSource = country;]
标签: windows silverlight windows-phone-7 silverlight-4.0 windows-phone-7.1