![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Enabling and Disabling animations easily; I am trying to implement a way where I can easily enable and disable animations via application configuration. I came up with the following solution... public class AnimationControl { .....#region const .........public static bool enableAnimation = false; .....#endregion .....public static void Begin( UIElement target, DependencyProperty property, AnimationTimeline timeline ) .....{ .........if ( enableAnimation ) .............target.BeginAnimation( property, timeline ); .........else .........{ .............LocalValueEnumerator en = timeline.GetLocalValueEnumerator(); .............en.Reset(); .............while( en.MoveNext() ) .............{ .................if ( en.Current.Property.Name == "To" ) .....................target.SetValue( property, en.Current.Value ); .................} .............} .........} .....} This works fine. However, animations that have completed events associated with them obviously wont work with this trick. Is there any way to manually signal a AnimationTimeline to fire that event? Thanks W |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Enabling/disabling device on hardware profile | Vista hardware & devices | |||
| running much faster after disabling and re-enabling aero... | Vista General | |||
| everything faster after disabling and re-enabling aero... | Vista General | |||
| Faster overall after disabling and re-enabling aero... | Vista General | |||
| Faster overall after disabling and re-enabling aero... | Vista General | |||