开发者

Is there a recommended approach to share state between screens in Blend 4 Sketchflow?

开发者 https://www.devze.com 2023-01-10 08:55 出处:网络
I am developing a Sketchflow prototype in Blend 4 and I need to share some state across the entire app - for instance - the currently selected开发者_StackOverflow中文版 item on screen 1. I looked at u

I am developing a Sketchflow prototype in Blend 4 and I need to share some state across the entire app - for instance - the currently selected开发者_StackOverflow中文版 item on screen 1. I looked at using a Datastore but it can only store simple types (strings, booleans,etc.) I want to store an entire object in there and then databind to it from other screens.

I didn't want to have to resort to a shared viewmodel if I didn't have to - it is a throw away prototype and didn't want to start architecting it like a real app.

Any ideas of exisitng facilities in Sketchflow that make this easy?

thanks Michael


The datastore is probably the simplest, but there are other relatively simple, throw away style things you can do.

  1. Static variables in your app.xaml.cs files
  2. Write your own behavior that has static variables to store global state
0

精彩评论

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

关注公众号