Is there an easy way to hide the scrollbar in a ListView, but still leave it scrollable?
2 Answers
You can make a custom ListView renderers for each platform (http://developer.xamarin.com/guides/cross-platform/xamarin-forms/custom-renderer/):
On Android:
ListView.VericalScrollbarEnabled = false;
On iOS:
UIScrollView.ShowsVerticalScrollIndicator = false;
5 Comments
Ilia Stoilov
Thanks! One more thing - can I change the color of the separator between the listview items and if yes what is the name of the property?
Daniel Luberda
No problem. iOS: UIScrollView.SeparatorColor, Android: ListView(this).Divider = new ColorDrawable(Android.Graphics.Color.Blue); ListView.DividerHeight(1);
barac340
As for your question about separator color (comments above) in ListView - Xamarin team recommend to use build-in bindable property SeparatorColor.
PaulVrugt
You can also do this by using an effect. This way you don't need to create a complete customer renderer for scrollviews. The effect can set the same properties as in this answer
Deepak
Hi, I am try to write custom renderer for hide scrollbar in listview. I am try to write above line in andorid 'onelementchanged' property but not luck. Please suggest where can i write this line for getting hide the scrollbar in listview in both andorid and ios in xamarin.