You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bd94046
Browse filesBrowse the repository at this point in the historyBrowse files
Refactor pointer event handling for selection logic
Refactored TableView, TableViewCell, and TableViewRow to override OnPointerPressed/OnPointerReleased instead of using AddHandler. Updated selection and drag logic to use internal TableView.OnAnyPointerPressed, improving event distinction and consistency. Removed OnAnyPointerReleased and centralized drag selection ending. Enhanced handling for pointer events over scrollbars, headers, and invalid areas.
UIElement?pressedElement=orignalSoruce?.FindAscendant<TableViewCell>();// Check if the pointer is over a cell
440
-
pressedElement??=orignalSoruce?.FindAscendant<TableViewRow>();// If not, check if the pointer is over a row
441
460
442
461
if(SelectionModeisListViewSelectionMode.None// Skip selection when SelectionMode is None
443
462
||IsDragSelecting// Skip selection when a drag is already in progress
444
-
||orignalSoruceisScrollBar// Skip selection when the pointer is over the ScrollBar
445
-
||orignalSoruce?.FindAscendant<ScrollBar>()is{}// Skip selection when the pointer is within a ScrollBar
446
-
||(pressedElement==null&&!ShowDragRectangle)// Skip selection when the pointer is not over a Cell or Row, and ShowDragRectangle is false.
447
-
||!pointerPoint.Properties.IsLeftButtonPressed// Skip selection when the left mouse button is not pressed
448
463
||canvasPointisnull// Skip selection when canvasPoint is null (e.g., pointer is outside the scroll canvas)
449
-
||canvasPoint.Value.Y<0// Skip selection when the pointer is in the column header area (above the scroll canvas)
450
-
||(pressedElement==null&&canvasPoint.Value.X<CellsHorizontalOffset)// Skip selection when the pointer is in the row header area (and not on a row/cell)
464
+
||canvasPoint.Value.Y<0// Skip selection when the pointer is in the column header area (above the scroll canvas)
465
+
||!pointerPoint.Properties.IsLeftButtonPressed// Skip selection when the left mouse button is not pressed
466
+
||(pressedElement==this&&!ShowDragRectangle)// Skip selection when the pointer is not over a Cell or Row, and ShowDragRectangle is false.
467
+
||(pressedElement!=this&&canvasPoint.Value.X<CellsHorizontalOffset)// Skip selection when the pointer is in the row header area (and not on the TableView)
451
468
||isShiftKey)// Skip selection when the Shift key is held
0 commit comments