From dd9ca350af64180550172632af40ffbb201ccc22 Mon Sep 17 00:00:00 2001 From: Jake Norbut Date: Wed, 14 Aug 2019 10:51:06 -0500 Subject: [PATCH] RowSelectionAdorner bounds check should use ScrollContentPresenter for X point --- .../spark/view/Controls/Adorners/RowSelectionAdorner.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/spark/view/Controls/Adorners/RowSelectionAdorner.cs b/src/client/spark/view/Controls/Adorners/RowSelectionAdorner.cs index aa9daf6df..d76d7c663 100644 --- a/src/client/spark/view/Controls/Adorners/RowSelectionAdorner.cs +++ b/src/client/spark/view/Controls/Adorners/RowSelectionAdorner.cs @@ -74,9 +74,12 @@ namespace mbts.ui.controls.adorners { // the adorner rectangle b/c the bottom of the row will be obscured by the scrollbar var bottom_is_within_bounds = lb.GetChildBounds(row).BottomRight.Y <= _diy_scroll.ActualHeight; if (top_is_within_bounds && bottom_is_within_bounds) { + // we use the scroll content presenter in the X point calculation instead of the row + // because of the OB which has a right side panel that takes up some space over + // row width drawingContext.DrawRectangle(_fill, _stroke, - new Rect(top_left, new Point(top_left.X + row.ActualWidth, top_left.Y + row.ActualHeight))); + new Rect(top_left, new Point(top_left.X + _diy_scp.ActualWidth, top_left.Y + row.ActualHeight))); } } }