There are two pages, on the first I create an instance of the class to which I add data. I turn to the second page and they are displayed. But when I re-enter the first page, and create new data, they overwrite existing ones, rather than being added. As I understand it, there should be one instance of the class to which I will add data each time, but how to implement it?

    1 answer 1

    I found a solution by using passing the class object as a parameter during the transition to another page.

    Frame.Navigate(typeof(Page), DS); 

    Where DS is what we want to transmit, and Page is the page to which we turn.