-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
On iOS, both <Picker>
and <Entry>
have borders by default. I consider this a bug because
A. It's different from Android, so you end up with different behavior on different platforms
B. Neither of these components have any Border*
properties. In order to remove the border, you need to add a custom native handler.
C. If I wanted a border, I could easily add one using a <Border>
component. But removing one is a hassle.
Steps to Reproduce
- Use a
<Picker>
or<Entry>
in iOS
Expected results:
Ideally, it would default to having a border (in both iOS and Android), but the border could easily be removed with a BorderWidth
property or something. But failing that, I think it should default to no border.
Actual results:
Border exists and can't be removed without native code.
Link to public reproduction project repository
No response
Version with bug
9.0.90 SR9
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
Microsoft.Maui.Handlers.PickerHandler.Mapper.PrependToMapping("MyApp.PickerHandler", (handler, view) =>
{
// Remove border around native picker element
handler.PlatformView.BorderStyle = UITextBorderStyle.None;
});