create entry without under line using maui
create entry without under line using maui
create entry without under line using maui
create entry without under line using maui
create entry without under line using maui
<Entry Placeholder="enter your name "/>
Ahmed Salama is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
The implementation of entry without under line colors for each platform:
On Android:
It’s needed to use handler in Android platform. You can add the following code in Platforms -> Android -> MainApplication.cs:
protected override MauiApp CreateMauiApp()
{
Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("RemoveUnderLine", (r, v) =>
{
r.PlatformView.BackgroundTintList =
Android.Content.Res.ColorStateList.ValueOf(Colors.Transparent.ToAndroid());
});
return MauiProgram.CreateMauiApp();
}
On Windows:
add the following code in Platforms -> Windows -> App.xaml:
<maui:MauiWinUIApplication.Resources>
<Thickness x:Key="TextControlBorderThemeThickness">0</Thickness>
<Thickness x:Key="TextControlBorderThemeThicknessFocused">0</Thickness>
</maui:MauiWinUIApplication.Resources>
On iOS:
On iOS platform, Entry does not have under line color by default.