Refreshing toolkit:listpicker after database update

105 Views Asked by At

I have toolkit:listpicker in my windows phone 8.1 app mainpage.xaml

<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>

and another page that add's item in local database. When i add item, listpicker is not refreshed until i close app and reopen it again.

Can someone help me with this?

1

There are 1 best solutions below

2
CrazyBernie On BEST ANSWER

Implement the Inotifypropertychanged pattern on your datasource. That way the UI wil respond to any changes you make in your datasource.

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