Click here to Skip to main content
13,005,920 members (98,768 online)
Rate this:
 
Please Sign up or sign in to vote.
How can I manually run a story board animation created in a blend WPF project using a code-behind file?
Posted 17-Oct-10 19:26pm
Updated 18-Oct-10 11:17am
Shog9101.5K
v4
Comments
Sandeep Mewara 18-Oct-10 4:32am
   
1. Not clear
2. Any effort?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Yes, You can. You need to set a Key (resource key) for your StoryBoard animation while designing a StoryBoard in XAML. Access it from codebehind using TryFindResource function. Then call BeginAnimation().
  Permalink  
Comments
Dalek Dave 19-Oct-10 3:21am
   
Good Call.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

This will work better in most cases :

Storyboard myStoryboard = (Storyboard)(this.FindName("myStoryboard"));
myStoryboard.Begin();
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Storyboard stbMove = (Storyboard)FindResource("storyboardname");
stbMove.Begin();
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170628.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100