How can you store state between screens in SketchF

2019-06-10 15:50发布

问题:

I'm building a prototype using Expression Blend 3 and SketchFlow (a Silverlight SketchFlow application to be specific) and it consists of multiple screens that I want to share state between.

Take this example:

  1. Screen 1 - 'Login' screen: I want the user to type in a fake user name and password.

  2. Screen 2 - 'Home' screen: I want to display that user name so the user sees that their input is reflected.

This is just a trivial example and not something that most prototypes need to demonstrate, but the same functionality could be used in an application where the selection on one screen needs to be persisted for the next screen.

How can I do this in SketchFlow? I know that I can write Silverlight code to store some data in isolated storage, but I'm trying to go with the 'zero code' approach since this will be a throw-away prototype and would prefer to use some built-in mechanism in SketchFlow if available.

Does Sketchflow offer a way to state data between screens?

回答1:

If you're doing a throw-away prototype, then my suggestion is the simpliest:

Only provide one path through the prototype. Only allow the person walking through the prototype to navigate through a single path through the different screens. That way, you don't have to worry about state because you always know how the user is going to get to that prototype screen.

It requires no code and gives the user/customer some idea of what the screens are going to look like.



回答2:

Here is an example showing how to use behaviors to store global state from Christian Schormann: http://electricbeach.org/?p=349



回答3:

You might also want to have a look at the demo I gave at PDC last week which contains an example for both preserving global state and a login behavior. Code for this sample is on my blog at electricbeach.org