This PR of mine just got merged into master on the Xamarin.Forms repository. With this change, you can disable showing the scrollbars with the ScrollBarVisibility enum for the ListView control. This was done before for the ScrollView, but not the ListView. This should be available in a Xamarin
I have introduced two simple properties on the ListView, these are HorizontalScrollBarVisibility and VerticalScrollBarVisibility. These are both of enum type ScrollBarVisibility, which was already introduced for the ScrollView I mentioned earlier. You can now simply set these on your ListView like this:
Or course, you can do the same thing from C# code. The ScrollBarVisibility enum has three options:
They are pretty self-explanatory. With Default, the behavior will remain the same as it is intended on that platform.
Here you can see the before and after screenshot on iOS;
If you look closely, you will notice that in the right screenshot the scrollbar is not visible while the ListView is scrolling (trust me ;))
Other PRs and Contributing yourself
There are some other posts I have written on PRs that got merged and did you ever think of contributing yourself? It is a great way of getting even more familiar with Xamarin
To get started you can simply head over to the repository, pick a great issue and start working on it, it is really as simple as that! If you need any help, please let me know, I’ll be happy to get you started.
2 thoughts on “Hide Scrollbars for ListView with ScrollBarVisibility”
Twin scrollbars, two beers 🍺
Comments are closed.