aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Core/ExtensionMethods
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-31 00:42:00 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-31 00:42:00 +0300
commitabfcceeb4fddb69eb3737789424dcc9ecb36d09c (patch)
treef6867d51b89378ada228dbce8f4141e96e49f81f /Software/Visual_Studio/Tango.Core/ExtensionMethods
parent3ba50278808cb6f08a8abf7ec0c0ecdae9c472c5 (diff)
downloadTango-abfcceeb4fddb69eb3737789424dcc9ecb36d09c.tar.gz
Tango-abfcceeb4fddb69eb3737789424dcc9ecb36d09c.zip
Take snapshot.
Diffstat (limited to 'Software/Visual_Studio/Tango.Core/ExtensionMethods')
-rw-r--r--Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs15
1 files changed, 8 insertions, 7 deletions
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<TouchEventArgs> touchDownHandler = (x, e) =>
+ EventHandler<TouchEventArgs> 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<TouchEventArgs> previewTouchDownHandler = (x, e) =>
+ EventHandler<TouchEventArgs> 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
/// <param name="deceleration">The deceleration.</param>
/// <param name="onComplete">The on complete.</param>
/// <returns></returns>
- 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)
{