开发者

How to go to a new screen at the end of an animation in SketchFlow

开发者 https://www.devze.com 2022-12-16 12:57 出处:网络
I have few screens that are wired up using Buttons to navigate to and fro. However, there is one screen that plays an animation when \"Loaded\" event occurs. I want to go to the \"next开发者_如何学C\"

I have few screens that are wired up using Buttons to navigate to and fro. However, there is one screen that plays an animation when "Loaded" event occurs. I want to go to the "next开发者_如何学C" screen when the current screen's animation finishes.

Could someone suggest how I can achieve this in Sketchflow? Thanks in advance.


Unfortunately there is no easy way to do this currently in SketchFlow.

You could fake this by having another screen included into your screen as a component screen, and displaying it at the end of your animation.


Well i think there is a way...

Start out with giving your storyboard a name

<Storyboard x:Name="anima"></Storyboard>

then go into the ".cs" file

//connect it to a listener

Storyboard ST = this.FindName("anima") as Storyboard;
ST.Completed += new EventHandler(AnimaListener);

//the listener
void AnimaListener(object sender, EventArgs e)
{
      Microsoft.Expression.Prototyping.Services.PlayerContext.Instance.ActiveNavigationViewModel.NavigateToScreen("nameOfTheNewScreen", true); 
}

http://social.expression.microsoft.com/Forums/en/blend/thread/e2970c76-6968-40db-a9c2-fca5d56f3f9f

Where i found the navigation code

http://www.eggheadcafe.com/software/aspnet/30084553/storyboard-completed-event.aspx

Where i found how to link a storyboard to a listener

0

精彩评论

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