aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.AnimatedGif
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.AnimatedGif')
-rw-r--r--Software/Visual_Studio/Tango.AnimatedGif/ImageBehavior.cs10
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 =