aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-06-13 11:40:04 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-06-13 11:40:04 +0300
commit9bdc00e0107cf4e58e589ebd852fa94b890a5e0a (patch)
treebe5da029d665138e9be22e4b1e50632d4573577f /Software/Visual_Studio/Tango.Touch/Controls
parent7d2ad40e0818b22914712c58f7acfaf7463db1a0 (diff)
downloadTango-9bdc00e0107cf4e58e589ebd852fa94b890a5e0a.tar.gz
Tango-9bdc00e0107cf4e58e589ebd852fa94b890a5e0a.zip
Fixed issue with touch scroll viewer.
Fixed issue with PPC stop dyeing button. Display minutes in hours display on PPC job progress.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs21
1 files changed, 15 insertions, 6 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
index 32ac3a2ab..69e1d00b8 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
@@ -779,7 +779,19 @@ namespace Tango.Touch.Controls
public double GetScrollPosition()
{
- return -_grid_content.Margin.Top;
+ double position = -_grid_content.Margin.Top;
+
+ if (position < 0)
+ {
+ position = 0;
+ }
+
+ if (position > (_grid_content.ActualHeight - _border_viewport.ActualHeight))
+ {
+ position = (_grid_content.ActualHeight - _border_viewport.ActualHeight);
+ }
+
+ return position;
}
/// <summary>
@@ -863,11 +875,8 @@ namespace Tango.Touch.Controls
{
_last_scroll_position = position;
- if (position >= 0)
- {
- DoubleValueChangedEventArgs e = new DoubleValueChangedEventArgs(ScrollingEvent, this, position);
- RaiseEvent(e);
- }
+ DoubleValueChangedEventArgs e = new DoubleValueChangedEventArgs(ScrollingEvent, this, position);
+ RaiseEvent(e);
}
}