From abfcceeb4fddb69eb3737789424dcc9ecb36d09c Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 31 May 2020 00:42:00 +0300 Subject: Take snapshot. --- .../ExtensionMethods/FrameworkElementExtensions.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Software/Visual_Studio/Tango.Core') diff --git a/Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs b/Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs index 05e204f17..426fbbd02 100644 --- a/Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs +++ b/Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs @@ -30,7 +30,7 @@ public static class FrameworkElementExtensions bool mousePressed = false; bool touchDown = false; - MouseButtonEventHandler mouseDownHandler = (x, e) => + MouseButtonEventHandler mouseDownHandler = (x, e) => { if (!touchDown) { @@ -57,7 +57,7 @@ public static class FrameworkElementExtensions //element.MouseDown += mouseDownHandler; element.AddHandler(FrameworkElement.MouseDownEvent, mouseDownHandler); - EventHandler touchDownHandler = (x, e) => + EventHandler touchDownHandler = (x, e) => { if (!mousePressed) { @@ -85,7 +85,7 @@ public static class FrameworkElementExtensions //element.TouchDown += touchDownHandler; element.AddHandler(FrameworkElement.TouchDownEvent, touchDownHandler); - MouseButtonEventHandler mouseUpHandler = (_, __) => + MouseButtonEventHandler mouseUpHandler = (_, __) => { touchDown = false; mousePressed = false; @@ -236,7 +236,7 @@ public static class FrameworkElementExtensions element.AddHandler(FrameworkElement.PreviewMouseDownEvent, previewMouseDownHandler); //element.PreviewMouseDown += previewMouseDownHandler; - EventHandler previewTouchDownHandler = (x, e) => + EventHandler previewTouchDownHandler = (x, e) => { if (!mousePressed) { @@ -264,7 +264,7 @@ public static class FrameworkElementExtensions //element.PreviewTouchDown += previewTouchDownHandler; element.AddHandler(FrameworkElement.PreviewTouchDownEvent, previewTouchDownHandler); - MouseButtonEventHandler previewMouseUpHandler = (_, __) => + MouseButtonEventHandler previewMouseUpHandler = (_, __) => { touchDown = false; mousePressed = false; @@ -592,7 +592,7 @@ public static class FrameworkElementExtensions { bool isLoaded = false; - element.AddHandler(FrameworkElement.LoadedEvent, new RoutedEventHandler((x, y) => + element.AddHandler(FrameworkElement.LoadedEvent, new RoutedEventHandler((x, y) => { if (!isLoaded) { @@ -766,10 +766,11 @@ public static class FrameworkElementExtensions /// The deceleration. /// The on complete. /// - public static DoubleAnimation StartDoubleAnimation(this FrameworkElement element, DependencyProperty property, TimeSpan duration, double to, double? from = null, double? acceleration = null, double? deceleration = null, Action onComplete = null) + public static DoubleAnimation StartDoubleAnimation(this FrameworkElement element, DependencyProperty property, TimeSpan duration, double to, double? from = null, double? acceleration = null, double? deceleration = null, Action onComplete = null, bool autoReverse = false) { DoubleAnimation ani = new DoubleAnimation(); ani.Duration = duration; + ani.AutoReverse = autoReverse; if (acceleration.HasValue) { -- cgit v1.3.1