Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ListPicker不再适用于我的Windows Phone 8应用程序_C#_Xaml_Windows Phone 8 - Fatal编程技术网

C# ListPicker不再适用于我的Windows Phone 8应用程序

C# ListPicker不再适用于我的Windows Phone 8应用程序,c#,xaml,windows-phone-8,C#,Xaml,Windows Phone 8,我有一个WIndows Phone应用程序。此应用程序在WIndows Phone 7.5中运行良好。但是,我需要做一些更新。所以我决定使用最新的工具包。当我决定做出改变时,我的列表选择器停止了工作。我有以下代码: <tk:ListPicker x:Name="typeListPicker" Grid.Row="7" ItemsSource="{Binding Path=MyTypes}" SelectedItem="{Binding Path=SelectedType, Mode=

我有一个WIndows Phone应用程序。此应用程序在WIndows Phone 7.5中运行良好。但是,我需要做一些更新。所以我决定使用最新的工具包。当我决定做出改变时,我的列表选择器停止了工作。我有以下代码:

<tk:ListPicker x:Name="typeListPicker" Grid.Row="7" ItemsSource="{Binding Path=MyTypes}" 
  SelectedItem="{Binding Path=SelectedType, Mode=TwoWay}" 
  ItemTemplate="{StaticResource typeTemplate}" 
  FullModeItemTemplate="{StaticResource fullTypeTemplate}" Margin="12,-2,12,0">
</tk:ListPicker>

目前,MyTypes中有10项。由于此集合的大小,将显示完整模式。但是,当我选择一个项目时,我不会回到ListPicker所在的屏幕。取而代之的是,我被带回到显示屏幕的页面。奇怪的是,我没有看到抛出异常或任何与此相关的东西

为了证实我的怀疑,我从MyTypes中删除了几个条目,并将它们合并为3个条目。这样,将不会显示完整模式。当我这样做的时候,我的屏幕工作正常。我不明白为什么我的应用程序中不再使用完整模式。任何建议都会有帮助


谢谢你

我在这里一遍又一遍地看到这个问题的不同变化

您的问题是SelectedItem在Windows Phone 8中不是可通知(不可绑定)属性

这个问题的答案将引导您找到解决方案,同时解释正在发生的事情