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

SfAutoComplete with border

I use Xamarin.Forms 3.6.0.264807 and Syncfusion.Xamarin.SfAutoComplete 17.1.0.32-beta.

It’s possible add border with radius arround SfAutoComplete control?

I am try achieve same look as SfTextInputLayoutStyle with ContainerType Outlined and OutlineCornerRadius 4.

I tried set this:

            <xForms:SfAutoComplete Grid.Column="0"

                                   Grid.Row="2"

                                   Watermark="Departments"

                                   SuggestionMode="StartsWith"

                                   ShowBorder="True"

                                   BorderColor="Black"

                                   DropDownCornerRadius="4"

                                   DataSource="{Binding Departments}"

                                   SelectedItem="{Binding SearchForm.Department}"

                                   DisplayMemberPath="Name" />


but no work. I get this look



3 Replies

MS Mugundhan Saravanan Syncfusion Team March 21, 2019 01:09 PM UTC

Hi Jan Minarik,

 
 
Greetings from Syncfusion. 
 
Query: "SfAutoComplete with border". 
 
We have analyzed the reported query. In our implementation, we have inherit the EditText control for SfAutoComplete control in the native platform so line should be appeared under the text it's a general behavior. We can overcome this by adding SfAutoComplete inside the SfBorder and set the ShowBorder property as false in SfAutoComplete.  
 
We have prepared a sample by using the SfAutoComplete inside the SfBorder. Please check the sample and let us know any other concern. 
 
Code Snippet: 
 <border:SfBorder  BorderColor="Black"  BorderWidth="2" CornerRadius="4">

 
            <autocomplete:SfAutoComplete Watermark="Departments"         
                                         MinimumHeightRequest="40" 
                                         ShowBorder="False"                              
                                         DataSource="{Binding Collections}" 
                                         SelectedItem="{Binding SelectedItem}" 
                                         DisplayMemberPath="Name" /> 
        </border:SfBorder> 
 
 
 
Screenshot: 
 
 
Sample 
 
Please check our UG-Documentation link for SfBorder control to know more information from the following 
 
 
 
Thanks,
Mugundhan S.
 



JM Jan Minarik March 21, 2019 05:16 PM UTC

Thank you. This solution is OK for me. 


DR Dhanasekar R Syncfusion Team March 22, 2019 11:38 AM UTC

Hi Jan Minarik, 
 
Glad that the solution works. Please get back to us if any further assistance on this. 
 
Regards, 
Dhanasekar 


Loader.
Live Chat Icon For mobile
Up arrow icon