2

Within Xamarin.Forms, I use a TimePicker control to let the user pick a time for scheduling purposes. I use a custom renderer for this purpose, because I need to set the Minute Interval to e.g. 30 minutes and the 24-hour clock. This all works perfect, except for styling issues. My TimePicker needs to be shown without a border on the label element (I don't really care about the style from the dialog)

Native Implementation from iOS causes the TimePicker to appear with a full border around. Native Implementation from Android causes the TimePicker to appear with a bottom-border.

Because Xamarin.Forms TimePicker does not have a border property and both Custom Renderers I created are unable to hide the border, I've chosen to initially hide the TimePicker by setting the property IsVisible=false and show a label control instead. This works as desired for the style issue, but setting this property causes the Android implementation to omit the Interval and 24-hour settings. The iOS implementation works as desired.

Any suggestions on how to resolve this? Seems like an Android bug or undesired implementation here, but still... Only other option I see would be to create my own implementation of a picker, which is possible and not hard, but not my first choice...

4

1 に答える 1