Reputation: 493
I am building a Hex Editor using the DataGrid control in WPF. The functionality I am trying to achieve is have the application only load small chunks of the file depending on where the user is currently viewing the file. To avoid loading big files all at once in the DataGrid, which is not efficient at all, I am loading this chunk which fills only a few rows.
To achieve this, I have disabled the built-in Vertical Scrollbar of the DataGrid and added a separate control for a scrollbar which I am planning to update manually. I am therefore looking for a way to get the some indication of the index of the visible rows so I can update the position of the scrollbar and read the file chunks as required.
Upvotes: 0
Views: 55
Reputation: 124
You can just use usual ScrollBar and listen scroll event, so when user scroll down you can handle this and load new chunk of data.
Upvotes: 1