Microsoft.Phone.Controls.Toolkit ListPicker引发XamlParseException [英] Microsoft.Phone.Controls.Toolkit ListPicker throws XamlParseException
问题描述
在被告知无法使用本机ComboBox
后,我被告知要查看Silverlight Toolkit ListPicker
.所以我确实遇到了问题.
After being advised that the native ComboBox
was not the way to go I was told to look at the Silverlight Toolkit ListPicker
. So I did and have got a problem.
我打开了一个新项目,并将新的ListPicker
拉到MainPage上. ListPicker
看起来像:
I opened a new project and pulled a new ListPicker
onto the MainPage. The ListPicker
looks like:
<toolkit:ListPicker x:Name="Result">
<toolkit:ListPickerItem Content="Win" />
<toolkit:ListPickerItem Content="Place" />
<toolkit:ListPickerItem Content="Lose" />
</toolkit:ListPicker>
尝试运行此代码时,我得到一个XamlParseException
,其InnerException为InvalidProgramException
.我所做的只是拖动控件,并添加一些ListPickerItem
.删除项目仍然会导致错误,完全删除ListPicker
控件将使该页面得以正确显示.
When trying to run this I get an XamlParseException
with InnerException of InvalidProgramException
. All I did was drag the control on, and add some ListPickerItem
. Removing the items still results in the error, removing the ListPicker
control completely allows the page to be shown with no error.
我确定我已经错过了一些东西,但是我阅读的所有文档似乎都指出该标记是可以的,包括 http://windowsphonegeek.com/articles/listpicker-for-wp7-indepth
I'm sure I've missed something, but any documentation I have read seems to point towards this markup being fine, including http://windowsphonegeek.com/articles/listpicker-for-wp7-in-depth
我可以提供所需的任何其他信息.
I can provide any other info required.
推荐答案
问题是已注册了错误的dll,即7而不是7.1.我必须卸载并重新安装才能使其正确更新,并且可以正常工作.
The problem was that the wrong dlls had been registered, i.e. 7 and not 7.1. I had to uninstall and reinstall to get it to update correctly and it worked.
这篇关于Microsoft.Phone.Controls.Toolkit ListPicker引发XamlParseException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!