diff options
| author | Mirta <mirta@twine-s.com> | 2020-12-30 16:39:52 +0200 |
|---|---|---|
| committer | Mirta <mirta@twine-s.com> | 2020-12-30 16:39:52 +0200 |
| commit | 00a491d93733d4625ad329b2ba8237f445364b3f (patch) | |
| tree | 4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs | |
| parent | 124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff) | |
| download | Tango-00a491d9.tar.gz Tango-00a491d9.zip | |
merge
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs index bb9f260c0..72bb7dd06 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchVirtualizedContentControl.cs @@ -128,30 +128,26 @@ namespace Tango.Touch.Controls Rect bounds = new Rect(_location.X, _location.Y, ActualWidth, ActualHeight); Rect rect = new Rect(0.0, _scrollViewer.GetScrollPosition(), _border_viewport.ActualWidth, _border_viewport.ActualHeight); - - if (_innerBorder != null) + if (bounds.IntersectsWith(rect)) { - if (bounds.IntersectsWith(rect)) + if (_innerBorder.Visibility == Visibility.Hidden) { - if (_innerBorder.Visibility == Visibility.Hidden) + //Debug.WriteLine("Visible"); + Dispatcher.BeginInvoke(new Action(() => { - //Debug.WriteLine("Visible"); - Dispatcher.BeginInvoke(new Action(() => - { - _innerBorder.Visibility = Visibility.Visible; - }), DispatcherPriority.Background); - } + _innerBorder.Visibility = Visibility.Visible; + }), DispatcherPriority.Background); } - else + } + else + { + if (_innerBorder.Visibility == Visibility.Visible) { - if (_innerBorder.Visibility == Visibility.Visible) + Dispatcher.BeginInvoke(new Action(() => { - Dispatcher.BeginInvoke(new Action(() => - { //Debug.WriteLine("Hidden"); _innerBorder.Visibility = Visibility.Hidden; - }), DispatcherPriority.Background); - } + }), DispatcherPriority.Background); } } } |
