c# - WPF Animation StoryBoard SpeedRatio changing but not having effect -


many in advance.

i came across bizarre behaviour. have method below, called correctly, no problems found. animationrunning boolean evaluates correctly true, actual speed of animation remains same, when value stored in speedratio changed (as made evident statusbar label), actual animation speed remains same.

 private void textboxtyping(object sender, keyeventargs e)     {         if (animationrunning == true) { storyboard.speedratio += 5; };          statusbar.content = "speed: " + storyboard.speedratio.tostring();     } 

to check whether animationrunning evaluates true, popped in messagebox.show("animation running"); inside if closure. , message pop out.

however, if change code following:

 private void textboxtyping(object sender, keyeventargs e)     {         storyboard.speedratio += 5;          statusbar.content = "speed: " + storyboard.speedratio.tostring();     } 

the speed of animation change. can't head around on how animationrunning being true, can't speedratio work inside if statement...

could shine light in poor mind of mine? thanks...

to set interactive speed ratio of clock created storyboard use storyboard.setspeedratio.

from msdn: interactively control storyboard, must use same containingobject parameter when calling interactive methods used begin storyboard. controllable storyboard can pause, resume, seek, stop, , removed. make storyboard controllable in code, must use appropriate overload of storyboard's begin method , specify true make controllable.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -