How to automate storyboard animation on page load using Expression Blend

I have a storyboard that should play when the page loads. Is there a way to do this directly from Expression Blend? I would prefer not to do this through code or xaml.

How to do the same for button clicks or other events?

thanks

+6
source share
2 answers

You can drag the behavior of the ControlStoryboardAction (Assets-> Behaviors) onto the page and set the EventLame to record in PageLoaded format and ControlStoryboardOption to play and storyboard into your storyboard.

+10
source

If you decide to do this with code, you just need to call Begin () from StoryBoard. Such as:

<Storyboard x:Name="fadeIn"> <DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Opacity" From="0.0" To="1.0" Duration="0:0:1" /> </Storyboard> private void btnFadeIn_Click(object sender, RoutedEventArgs e) { this.fadeIn.Begin(); } 
+3
source

Source: https://habr.com/ru/post/887905/


All Articles