diff options
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); } } } |
