wpf - Testing the scrollbar visibility of a ListBox in code-behind -
How to check whether the vertical scrollbar of the list-box is code-behind?
I have X: name = "listOfItems" with a list box and its built-in ScrollViewer's VerticalScrollbarVisibility is set to Auto.
When the ItemsSource property of ListBox is set, I want to see whether the vertical scrollbar is visible, but I do not know which property to check or how to dive into the scrollover element of the list. .
Any suggestion
You can find the listbox scroll weaver as described here :
You can use the Computitive Scalability Barrier Property to check whether you are viewing scrollbars:
ScrollViewer sv = SearchViewBuild & lt; ScrollViewer & gt; (ListOfItems); Visibility Scrollbar visibility = sv.ComputedVerticalScrollBarVisibility;
Comments
Post a Comment