Listpicker error SelectedItem must always be set to a valid value

后端 未结 4 1068
-上瘾入骨i
-上瘾入骨i 2020-12-16 02:38

I have a page in a Windows Phone 7 app where the user can edit or delete an Transaction object. The Transaction object is an Linq-to-Sql class that have a relationship with

4条回答
  •  被撕碎了的回忆
    2020-12-16 02:54

    This error may also be caused by the order of the XAML properties:

    This does NOT work (throws the exception because the ItemsSource is null when the SelectedItem is set):

    
    

    This works as the itemssource is initialized first:

    
    

提交回复
热议问题