Please, help me to remove lines in the picker.I tried SelectionDividerHeight=0,but I have the error
Asked
Active
Viewed 1,421 times
2 Answers
1
If you are trying to build this with Xamarin.Native Android, and you are using a NumberPicker
or DatePicker
, it is an easy solution: picker.ShowDividers = ShowDividers.None;
But if you are using the Xamarin.Forms picker, there is no property you can use to hide the separator, as you can see in the official docs. So you have to use a CustomRenderer.
Here's an example of how to create a custom renderer for a Xamarin.Forms Picker and use it in your code.
Here's another good resource for Xamarin.Android native pickers

Saamer
- 4,687
- 1
- 13
- 55
-
I have my CustomPicker and I used NumberPicker,but picker.ShowDividers = ShowDividers.None; did not help me – Maria Kamenskyh Aug 24 '20 at 10:51
-
Please share the code of the CustomPicker that is overriding the behavior. It's probably in your adapter – Saamer Aug 24 '20 at 17:49
0
If you want to remove lines you can use this function and make color Transparent Change color lines in Picker XAMARIN

Maria Kamenskyh
- 467
- 1
- 3
- 21
-
You can mark this answer later so that we can help more people with same problem:). – nevermore Aug 25 '20 at 05:16
-