Reputation: 3191
Is there an easy way to save the state of a Silverlight application and retrieve it at the next reboot?
I know Silverlight can save and read data locally on the client, but what I seek is a method which behave similarly to what the Eclipse IDE do respect the perspectives and views selected by the user. I'd like if Silverlight can remember in the next reboot the last page seen by user and the state of the widgets.
Upvotes: 1
Views: 178
Reputation: 1364
If you store your current details about the application in one object like a singleton you could serialize this and save it in a database. Next time the application is launch you download it and de- serialize the object it will give you the way the application was.
However this means that you need to be using this singleton though out the application or a process of going through the object to set the application up again.
So i guess it isnt easy really.
Upvotes: 0
Reputation: 93561
As you mention "the last page seen by [the] user" you really need to look at using a navigation framework instead of "remebering" the last used page.
That way your app becomes deep-linkable via standard bookmarks.
Note: If you were writing a WP7 app I would say the opposite, but you seem to be asing about an SL web app.
Upvotes: 0
Reputation: 17905
There is no built-in way to do that. You have to manually code all the state and save it on a client yourself.
Upvotes: 1