In my example below I have a "MainWindow" with 2 text boxes showing data from a Class1 object.
On loading the "MainWindow" I create a new Class1 object, "myObj", and assign this object to the DataContext of the "MainWindow" grid.
The TextBox Text properties were bound in the XAML.
The new data is displayed correctly on the page.
I click the "Next" button to navigate to a PageFunction which displays a message and a "Back" button.
On clicking the "Back" button the click event executes an OnReturn.
Back in the "MainWindow" the OnReturn event handler displays a message indicating that the event was executed.
When the "MainWindow" is displayed the fields are blank - what is the recommended method for persisting the data binding definitions?
A solution that I tried (reflected in my code below under the heading "Page function with persisted data"):
1) Add a Public Property in the PageFunction to receive the Class1 object ("myObj" to be persisted)
2) In the PageFunction "Back" button click event, return the object in the OnReturn statement.
3) In the "MainWindow"'s return event handler, assign the returned object to the "myObj".
This alone does
View Complete Post