How to prevent auto-horizontal scroll when selecting a TreeViewItem #17020
cornerbowlsoftware
started this conversation in
General
Replies: 1 comment
-
Hello! For horizontal scrolling I solved this by overriding the OnRequestBringIntoView method in my TreeNode.
You can disable scrolling entirely using the TreeView.AutoScrollToSelectedItem property. For example, you can override its default value to false, in your tree.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to prevent the TreeView from auto-horizontal scrolling when I click on an item that overflows horizontally. I solved this in my WPF app by overriding OnRequestBringIntoView then manually calling ScrollViewer ScrollToLeftEnd which doesn't exist in Avalonia. In my WPF app, this also forces me to handle the vertical scroll which I accomplish with several variables, TreeViewItem.Height, ScrollViewer ActualHeight, ScrollViewer.Bounds.Height, and SystemParameters.HorizontalScrollBarHeight. Before I tackle the vertical scroll, I need to handle the horizontal scroll. Does anyone know how this can be accomplished?
Beta Was this translation helpful? Give feedback.
All reactions