Avalonia.Controls.TreeDataGrid
Avalonia.Controls.TreeDataGrid copied to clipboard
MVP of support for variable-height rows.
Adds support for variable-height rows, and adds a Wikipedia example to the sample app to demonstrate.
Scrolling can currently be a little bit jerky, to solve this we will need to implement scroll anchoring, but that will come in a separate PR.
Fixes #43
Scrolling with mousewheel seems to not be so happy when trying to scroll up from the bottom of the tree
Yeah we need to adjust how ScrollBar
works a to fix the jittery scrolling. Currently I managed to make scrolling down smooth but scrolling up is jittery as said. To make it smoother we either need:
- A way to get the "raw" delta from the scrollbar, so we can tell if the user is scrolling up or down (at the moment it's impossible due to the fact the offset changes along with the extent/viewport so a scroll up can look like a scroll down)
- For
ScrollBar
to use the absolute delta from the point that scrolling began instead of from it's current position
Either way, I think it's going to need changes to Avalonia itself.
VirtualizingStackPanel
in the main Avalonia repository was based on the initial work here, but has been greatly improved. I need to take the changes to the algorithm in VirtualizingStackPanel
and update this PR.
Ok, this PR should now be ready. Scrolling is now smooth, though the scrollbar jerks about as with Avalonia's virtualization implementation. We'll need to implement better height estimation as discussed in https://github.com/AvaloniaUI/Avalonia/pull/10892 but this should be quite usable now.