积极答复者
在xaml中ListPickerItem如果多于5个运行程序就会出错

问题
-
你们有遇到这个问题吗,我在xaml页面中
<StackPanel> <toolkit:ListPicker Header="现有货币" Name="listPicker1"> <toolkit:ListPickerItem Content="Johnny" /> <toolkit:ListPickerItem Content="Tommy" /> <toolkit:ListPickerItem Content="Alumi" /> <toolkit:ListPickerItem Content="Alumi" /> <toolkit:ListPickerItem Content="Alumi" /> <toolkit:ListPickerItem Content="Alumi" /> </toolkit:ListPicker> <toolkit:ListPicker Header="兑换货币" Name="listPicker2" > <toolkit:ListPickerItem Content="Johnny" /> <toolkit:ListPickerItem Content="Tommy" /> <toolkit:ListPickerItem Content="Alumi" /> <toolkit:ListPickerItem Content="Alumi" /> <toolkit:ListPickerItem Content="Alumi" /> </toolkit:ListPicker> </StackPanel>
现有货币有六项,兑换货币有五项,我运行程序后点击现有货币程序就报错,点击兑换货币就没问题,这是怎么回事呢?是ListPickerItem 有限制吗?在cs中动态添加很多项都可以,但是在xaml中存有固定的项多于五项的时候运行起来就出错,有人能帮我解答一下吗?谢谢啦。。。2011年11月18日 8:25
答案
-
您用来的是Silverlight for Windows Phone toolkit,最新发布的Silverlight更新了bug
- Download the Silverlight for Windows Phone Toolkit
- For Mango Development (Windows Phone 7.1 SDK)
- To get started, need the tools from http://create.msdn.com/
- For Windows Phone 7.0 development, you can still download the February 2011 Silverlight for Windows Phone Toolkit
- Discuss: App Hub forums
Xuesong- 已标记为答案 Edward_Nuo 2011年12月6日 7:27
2011年11月19日 7:42 -
listpickerItem为2个的时候高度是192px,以后每增加1个Item,高度增加192px,如此类推,当增加到5个的时候高度为768px,那么第6个就无法在屏幕内显示完整,因此会有报错。
- 已建议为答案 XuesongGao 2011年12月22日 7:44
- 已标记为答案 Edward_Nuo 2012年1月13日 17:37
2011年12月22日 6:44
全部回复
-
您用来的是Silverlight for Windows Phone toolkit,最新发布的Silverlight更新了bug
- Download the Silverlight for Windows Phone Toolkit
- For Mango Development (Windows Phone 7.1 SDK)
- To get started, need the tools from http://create.msdn.com/
- For Windows Phone 7.0 development, you can still download the February 2011 Silverlight for Windows Phone Toolkit
- Discuss: App Hub forums
Xuesong- 已标记为答案 Edward_Nuo 2011年12月6日 7:27
2011年11月19日 7:42 -
listpickerItem为2个的时候高度是192px,以后每增加1个Item,高度增加192px,如此类推,当增加到5个的时候高度为768px,那么第6个就无法在屏幕内显示完整,因此会有报错。
- 已建议为答案 XuesongGao 2011年12月22日 7:44
- 已标记为答案 Edward_Nuo 2012年1月13日 17:37
2011年12月22日 6:44