mirror of
https://github.com/fadden/6502bench.git
synced 2024-09-11 20:54:37 +00:00
The ListView control provides a ScrollIntoView() method that ensures the specified item is on screen, scrolling the ListView if needed. Unfortunately this method is very slow (50-100 ms) and sometimes fails entirely on larger lists. (Yay WPF.) Because the ListView is scrolling by fixed-height item, it's possible to use the underlying ScrollViewer to move the list instantaneously and reliably. So now we do that. Also, fixed a bug with select-all, where we weren't clearing the previous selection before calling SelectAll(), leading to a mismatch with the secondary data structure that we maintain because WPF ListViews can't deal with large selections efficiently. (Yay WPF.) There's still some weird behavior, e.g. sometimes hitting F5 clears the current selection and sometimes it doesn't. I think it's related to which item has focus and the fact you're hitting a key; using the debug menu item doesn't cause the behavior. Also, increased MAX_SEL_COUNT from 2000 to 5000. That takes about 200ms to restore to a ListView on my 5-year-old system. |
||
---|---|---|
.. | ||
Properties | ||
CommonWPF.csproj | ||
Helper.cs | ||
InverseBooleanConverter.cs | ||
MultiKeyInputGesture.cs | ||
WindowPlacement.cs | ||
WPFExtensions.cs |