I have a list of Grids with several rows and columns containing StackPanels. Each stack panel contains one or more Image objects, in some cases none at all and some Borders.
I would like to save these Grids to a file(sort of save functionality) and later get it back into memory and display it again.
What would be the best approach? Is there a way to do this operation in a simple way, or should I add every important data to the file, like the row and column count, StackPanel count, and how many Image objects are they having and each image with their position in the StackPanel and so on?
Edit: These Grid objects are created and managed completely in code-behind. I use the MVVM pattern throughout the project. (in case these are important to informations)