Answered by:
How to start SketchFlow animation?

Question
-
Dear all,
How to start SketchFlow animation(not Expression Blend Storyboard)? Can it be set to start in code or set from SketchFlow designer?
Look forward your advice.
Thanks you in advance,
Yuanzi
Enjoy lifeTuesday, March 2, 2010 1:05 PM
Answers
-
The easiest way you can start a SketchFlow Animation is to use a behavior:
Right click the object that you want to have control the animation, and select "Play Sketchflow Animation", and then the animation you created from the sub-menu. This will create a PlaySketchFlowAnimationAction on your object. By default it will use the Click event to trigger the action. If you want to change that (such as doing it on load, or mouse over), select the action in the objects and timeline panel and adjust the trigger properties in the properties panel.
You can also do this from code, but it is less straightforward:
Microsoft.Expression.Prototyping.Services.PlayerContext.Instance.ActiveNavigationViewModel.PlaySketchFlowAnimation(
The first argument is the name of the SketchFlow Animation in the xaml (the visual state group), it will have the prefix _SketchFlowAnimation_, the second argument is the full classname of the screen that contains the SketchFlow Animation. You can get these easily by assigning a behavior as shown above, and examing the xaml, or the values in the properties panel.
"_SketchFlowAnimation_SketchFlowAnimation",
"SilverlightPrototype19Screens.Screen_1");- Edited by Chuck HaysModerator Tuesday, March 2, 2010 3:01 PM Code formatting
- Proposed as answer by Chuck HaysModerator Tuesday, March 2, 2010 3:02 PM
- Marked as answer by Yuanzi Wednesday, March 3, 2010 1:44 AM
Tuesday, March 2, 2010 3:01 PMModerator
All replies
-
The easiest way you can start a SketchFlow Animation is to use a behavior:
Right click the object that you want to have control the animation, and select "Play Sketchflow Animation", and then the animation you created from the sub-menu. This will create a PlaySketchFlowAnimationAction on your object. By default it will use the Click event to trigger the action. If you want to change that (such as doing it on load, or mouse over), select the action in the objects and timeline panel and adjust the trigger properties in the properties panel.
You can also do this from code, but it is less straightforward:
Microsoft.Expression.Prototyping.Services.PlayerContext.Instance.ActiveNavigationViewModel.PlaySketchFlowAnimation(
The first argument is the name of the SketchFlow Animation in the xaml (the visual state group), it will have the prefix _SketchFlowAnimation_, the second argument is the full classname of the screen that contains the SketchFlow Animation. You can get these easily by assigning a behavior as shown above, and examing the xaml, or the values in the properties panel.
"_SketchFlowAnimation_SketchFlowAnimation",
"SilverlightPrototype19Screens.Screen_1");- Edited by Chuck HaysModerator Tuesday, March 2, 2010 3:01 PM Code formatting
- Proposed as answer by Chuck HaysModerator Tuesday, March 2, 2010 3:02 PM
- Marked as answer by Yuanzi Wednesday, March 3, 2010 1:44 AM
Tuesday, March 2, 2010 3:01 PMModerator -
i'm using Blend 4, and i couldn't find "Play Sketchflow Animation" anywhere !!Thursday, July 8, 2010 8:01 PM
-
Are you working with a SketchFlow project? That menu item is only available in SketchFlow specific projects.Thursday, July 8, 2010 8:24 PMModerator