How can you change the focus border and cursor color in a Entry control in Xamarin forms? In the emulator it is standard red?
I added this in my Android project
[assembly: ExportRenderer(typeof(CustomEntryControl), typeof(MyEntryRenderer))]
namespace MyApp.Droid
{
public class MyEntryRenderer : EntryRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged(e);
if (Control != null)
{
Control.SetBackgroundColor(global::Android.Graphics.Color.LightGreen);
}
}
}
}
But can't find the property for border or cursor?

You can change Entry focus color in Android Project in the style.xml file. The path is: Resources/values/styles.xml
Then, look at the "colorAccent" property to set the custom color.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With