From f27893986e9fd647a69be8569ecd5d944f853869 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 18 Apr 2019 20:48:48 +0300 Subject: Implemented machine status animations. --- Software/Visual_Studio/Tango.AnimatedGif/ImageBehavior.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Software/Visual_Studio/Tango.AnimatedGif') 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 = -- cgit v1.3.1