Search code examples
xamarin.formsuwpautosuggest

Auto Suggest Entry in xamarin forms


I am trying to create a AutoComplete Text Entry using Xamarin Forms. I was able to accomplish the functionality using dotmorten.xamarin.forms.autosuggestbox(https://github.com/dotMorten/XamarinFormsControls/tree/master/AutoSuggestBox. The issue that I am facing is I am unable to change the font size and border width using this control. I want it to look like a entry field with only bottom border but it looks more like a Box entry. Is there a way to customize it or is there any other control/way to achieve similar functionality.

Any help is appreciated!

<dm:AutoSuggestBox Grid.Row="4" Grid.Column="0" Margin="20,0,20,0" x:Name="Customer_Name" ItemsSource="{Binding SelectedCustomerList}" 
                       PlaceholderText="Enter customer name" TextColor="#626366" BackgroundColor="White"
                       TextChanged="CustSuggestionBox_TextChanged"
                       QuerySubmitted="CustSuggestionBox_QuerySubmitted" />

Solution

  • With the latest v0.7 you can override the renderer and tweak it yourself. See the example app that shows how it changes the style on iOS (in this case the bounding box but you can access most properties). Also if it's just UWP you could just declare an explicit style for AutoSuggestBox and the forms version would pick it up (as it's merely using that underneath)