I have a WPF DataGrid, which when there are too many rows to view on the screen it gets a vertical scrollbar. What I would like to know is if there is a way to
It's sort of an overcomplicated way of doing it, but it may work. First, subclass DataGridRowsPresenter and override the OnViewportOffsetChanged method. Then, duplicate the standard control template for the datagrid, and replace the DataGridRowsPresenter with your own. I leave the details of hit testing for a row relative to the viewport up to you ;-).
What are you trying to accomplish, specifically? Maybe we can come up with a better way, as this may be very brittle and requires a bunch of extra work (i.e. keeping the control template in sync if they update it).