0
votes

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" />
2

2 Answers

1
votes

If it is the UWP target that you are trying to tweak, you should look at the documentation of the AutoSuggestionBox control. Because that is the actual control being used in the repo you are targeting.

Docs: https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.autosuggestbox

There is a whole set of Resource keys defined that make out the actual Control Style ( https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.autosuggestbox#control-style-and-template ) so try modifying those to fit your need. You just need to add it to your App.xaml file in the UWP project, they will be automatically picked up.

1
votes

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)