diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-04-18 20:48:48 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-04-18 20:48:48 +0300 |
| commit | f27893986e9fd647a69be8569ecd5d944f853869 (patch) | |
| tree | 40673893d6c8b43119633801710035b55315f7e8 /Software/Visual_Studio/Tango.AnimatedGif | |
| parent | 8a249931cbff190c1c86a0b7bddc0b80b74370c2 (diff) | |
| download | Tango-f27893986e9fd647a69be8569ecd5d944f853869.tar.gz Tango-f27893986e9fd647a69be8569ecd5d944f853869.zip | |
Implemented machine status animations.
Diffstat (limited to 'Software/Visual_Studio/Tango.AnimatedGif')
| -rw-r--r-- | Software/Visual_Studio/Tango.AnimatedGif/ImageBehavior.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.AnimatedGif/ImageBehavior.cs b/Software/Visual_Studio/Tango.AnimatedGif/ImageBehavior.cs index cc13688ff..63b951a2f 100644 --- a/Software/Visual_Studio/Tango.AnimatedGif/ImageBehavior.cs +++ b/Software/Visual_Studio/Tango.AnimatedGif/ImageBehavior.cs @@ -264,6 +264,16 @@ namespace Tango.AnimatedGif private static void SetAnimationController(DependencyObject obj, ImageAnimationController value) { obj.SetValue(AnimationControllerPropertyKey, value); + + if (value != null) + { + (value as ImageAnimationController).SpeedRatio = GetSpeedRatio(obj as Image); + + if (GetEnableAnimation(obj as Image)) + { + (value as ImageAnimationController).Play(); + } + } } private static readonly DependencyPropertyKey AnimationControllerPropertyKey = |
