We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom Renderer not fireing in Xamarin Forms (Android)

Thread ID:





143274 Mar 12,2019 04:06 PM UTC Mar 14,2019 12:36 PM UTC Xamarin.Forms 3
Tags: SfAutoComplete
Asked On March 12, 2019 04:06 PM UTC

I am trying to remove the underline in the Syncfusion Autocomplete plugin ( or atleast make it transparent), this is my code:

    [assembly: ExportRenderer(typeof(SfAutoComplete), typeof(AutoCompleteRenderer))]
   namespace Pets.Droid
    public class AutoCompleteRenderer : SfAutoCompleteRenderer

        protected override void OnElementChanged(ElementChangedEventArgs<SfAutoComplete> e)
            if (Control != null)
                GradientDrawable gd = new GradientDrawable();
                gd.SetStroke(0, Android.Graphics.Color.Transparent);

but for some reason it wont fire, I also tried to create a custom MyAutoComplete class that inherits from SfAutoComplete and change the input in my XAML to local:MyAutoComplete but same results.

Anyone see what could be the issue?

Vanaja  Annasamy [Syncfusion]
Replied On March 13, 2019 12:16 PM UTC

Hi Chris,

Greetings from Syncfusion support.

We suggest you to use ShowBorder property to enable/disable the border in SfAutoComplete. We have created the sample for your reference. Please download it from the below link.

Sample link:  http://www.syncfusion.com/downloads/support/forum/143274/ze/AutoComplete_1146430840 

Please try our sample and let us know if you have any concern on this.

Vanaja R.A. 

Replied On March 13, 2019 01:19 PM UTC

Thank you, I had no idea that line had to do anything with border, I would have called it an underline or similar. But, thank you, it works as intended now

Dhanasekar R [Syncfusion]
Replied On March 14, 2019 12:36 PM UTC

 Hi Chris, 
Glad that the solution works. Please get back to us if any further assistance on this. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon