calico
[SOLVED] (WPF) Textblock inputs not saving on Navigation to new page?
Sorry again, just thought I would post here as I've been able to fix the issue for anyone having a similar problem:
Essentially I went and created a static instance of each page at runtime, so instead of the NavigationService creating a new instance of each window when navigating with my sidebar, it would simply load the static instance of each page that would save each time I navigated.
Example below:
App.xaml.cs
MainWindow.xaml.cs
16 replies
[SOLVED] (WPF) Textblock inputs not saving on Navigation to new page?
Sorry, but a new discovery: If I leave the navigationUI visible, and I click the back or forth button, it seems to keep the information in the textboxes.
But when I navigate by clicking on the buttons I have in my sidebar (shown in the code above) it clears all the values..
16 replies
[SOLVED] (WPF) Textblock inputs not saving on Navigation to new page?
For storing the information, would like to store it only in runtime or on disk, so it'll be loaded the next time the application starts?I just need to store it for the duration of the runtime, no need to save it for when the application reopens
16 replies
[SOLVED] (WPF) Textblock inputs not saving on Navigation to new page?
Ohh okay, yes I was looking into MVVM but wasn't sure if it was what I needed.
As far as I understand, by using MVVM I will basically be loading the page into the frame and any other page "on top" of it so it won't erase the data thats already entered(?)
For some background on the program, its just supposed to be a simple interface that will take the user inputs to generate and structure a .xml file to be opened, so I was also guessing I would need to store the entries as strings anyways for that purpose?
16 replies