I am creating a software in WPF, and, in the software, the User can load an image, and configure a map.
Basically, once the Image (of a map) is loaded the user can add other images (like a picture of a treasure or a monster, etc) drag and drop them within the image of the Map.
When the user closes the software, and reopens it, I want the last image opened, and the UI elements added to be in the same place, like how the User had set up, before closing the application.
One way I can think of, is storing the image file in a byte array, or saving the file location , and the other UI element positions in a text file and checking it every time the application is loaded.
However, is there an easier way to solve this? Is there a way I can store the state of the WPF application Page?