Maui customise Entry elements for android issue
Haviv Elbsz
2,071
Reputation points
Hi all
This code work but
1 Why I forced to add the using directive
2 Why its not working when I put it
in content page constructor
My Entry elements background color is lost why so.
From the internet solutions the same
customise code that works for others
not working for me.
Why so
Thank you very much
// 02012023
using Microsoft.Maui.Platform;
namespace RazKmoShed;
public partial class App : Application
{
public App()
{
InitializeComponent();
// Remove Entry control underline
Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("NoUnderline", (h, v) =>
{
h.PlatformView.BackgroundTintList =
Android.Content.Res.ColorStateList.ValueOf(Colors.Transparent.ToPlatform());
});
MainPage = new AppShell();
}
}
Sign in to answer