So I have a detail page on my WP7 app that shows a listbox showing some data from my app.
In the codebehind, I set the listbox itemssource = to a collection of objects. Pretty simple so far. I also have few text boxes and a button on the same screen that lets me add to that object collection.
Ideally when I navigate to the page, it should show the contents of the collection in the listbox. If I click add, it should add another object to the collection and then refresh the listbox to show the newly updated contents.
I set the itemsSource in the onNavigatedTo event, and I set the itemsSource in my button click event as well. My button click event just pulls the text from the textbox, creates an instance of my object with the text, adds the object to the collection, and re-sets the itemsSource
The problem is, the listbox only updates when i hit the back button and re-enter the page. Setting the itemSource on my button click event doesn't seem to do anything - the listbox won't refresh.
Does anyone know how I can refresh the listbox?