0
在升級到Wp8.1 silverlight後,我的列表選擇器在運行時失敗,此時執行InitializeComponent();
。將wp8升級到wp8.1 silverlight,初始化組件時出現Listpicker錯誤
WPtoolKit列表選擇器來自哪裏,已更新,但仍在我的解決方案中:\packages\WPtoolkit.4.2013.08.16\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll
。
列表選擇器顯示在XAML設計視圖和代碼是:
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
.
.
.
<StackPanel Grid.Row="0" Grid.RowSpan="3" Orientation="Horizontal" >
<toolkit:ListPicker x:Name="LP_Map" Width="284" Template="{StaticResource ListPicker_ChooseCountry_CreateGame_test}" BorderBrush="#FF884900">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<cmd:EventToCommand Command="{Binding ChangeMapCommand}" CommandParameter="{Binding ElementName=LP_Map}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<toolkit:ListPickerItem Background="#FFAB7D33" Content="Europe1328WithWater" Foreground="Black" Style="{StaticResource ListPickerItem_CreateGame_ChooseCountry_test}" />
</toolkit:ListPicker>
<toolkit:ListPicker x:Name="Player_LP" Width="150" SelectionChanged="SelChangedCommand" BorderBrush="#FF884900" Foreground="Black">
<toolkit:ListPickerItem Background="#FFAB7D33" Content="2 Players" Foreground="Black" FontFamily="Andalus" />
<toolkit:ListPickerItem Background="#FFAB7D33" Content="3 Players" FontFamily="Andalus" />
<toolkit:ListPickerItem Background="#FFAB7D33" Content="4 Players" FontFamily="Andalus" />
</toolkit:ListPicker>
</StackPanel>
我不明白爲什麼我得到一個XAML解析錯誤,是不是我需要明確地更新或變更後重新定位解決方案?
注意 使用MVVMLight的EventToCommand不是問題,這已被更新爲使用參數包。