I have a TreeView
(the only control) inside a Grid
, and I only want to see the vertical scrollbar when the height isn't enough.
To not have the horizontal scrollbar, I have to account for its width to the width of the TreeView, right? But when I only specify the width to stretch the TreeView's width to the width of the Window
, no scrollbar appears.
Is there a way to solve this?
Alternatively if I can make it so that I don't have to specify the width and height of the TreeView
and it resizes its width when the height isn't enough, to fit the vertical scrollbar, that would be the best.