开发者

easy way to save the state of Silverlight

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 local开发者_高级运维ly 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.


There is no built-in way to do that. You have to manually code all the state and save it on a client yourself.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜