aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-07-01 17:56:49 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-07-01 17:56:49 +0300
commit8a1e772f025eaf3bfdf17905d9e33c460993e559 (patch)
treeb6d705cca71033cd6c5f814596ceb9abc849bf50 /Software/Visual_Studio/Tango.Touch
parentc0fd8dcc53e45aa5aa0095cc2c8c5f39a34f7886 (diff)
downloadTango-8a1e772f025eaf3bfdf17905d9e33c460993e559.tar.gz
Tango-8a1e772f025eaf3bfdf17905d9e33c460993e559.zip
Many bug fixes !!!
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs21
1 files changed, 12 insertions, 9 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
index 69e1d00b8..dcd643ace 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
@@ -525,18 +525,21 @@ namespace Tango.Touch.Controls
double position_y = e.Location.Y - _mouse_down_location.Y;
double bottom_offset = -(_grid_content.ActualHeight - (_border_viewport.ActualHeight + -position_y));
- _grid_content.BeginAnimation(Grid.MarginProperty, null);
+ if (_grid_content.ActualHeight > _border_viewport.ActualHeight)
+ {
+ _grid_content.BeginAnimation(Grid.MarginProperty, null);
- _grid_content.Margin = new Thickness(0, position_y, 0, 0);
+ _grid_content.Margin = new Thickness(0, position_y, 0, 0);
- if (_grid_content.Margin.Top > 0)
- {
- _grid_content.Margin = new Thickness(0, 0, 0, 0);
- }
+ if (_grid_content.Margin.Top > 0)
+ {
+ _grid_content.Margin = new Thickness(0, 0, 0, 0);
+ }
- if (_grid_content.Margin.Top < -(_grid_content.ActualHeight - _border_viewport.ActualHeight))
- {
- _grid_content.Margin = new Thickness(0, -(_grid_content.ActualHeight - _border_viewport.ActualHeight), 0, 0);
+ if (_grid_content.Margin.Top < -(_grid_content.ActualHeight - _border_viewport.ActualHeight))
+ {
+ _grid_content.Margin = new Thickness(0, -(_grid_content.ActualHeight - _border_viewport.ActualHeight), 0, 0);
+ }
}
if (position_y > 0)