正在刷新工具箱:数据库更新后的listpicker



我的windows phone 8.1应用程序mainpage.xaml 中有工具包:listpicker

<toolkit:ListPicker x:Name="ListPicker"
                    HorizontalAlignment="Left"
                    Margin="40,10,0,0"
                    VerticalAlignment="Top"
                    Grid.Row="1">
    <toolkit:ListPicker.ItemTemplate>
        <DataTemplate>
            <toolkit:ListPickerItem Content="{Binding ListName}" />
        </DataTemplate>
    </toolkit:ListPicker.ItemTemplate>
 </toolkit:ListPicker>

以及在本地数据库中添加项目的另一个页面。当我添加项目时,直到我关闭应用程序并重新打开它,列表选择器才会刷新。

有人能帮我吗?

在数据源上实现InotifyProperty更改模式。这样,UI将响应您在数据源中所做的任何更改。

http://danrigby.com/2012/03/01/inotifypropertychanged-the-net-4-5-way

最新更新