Articles in this section
Category / Section

How to restrict the Maximum heigh of the Popup

1 min read

Syncfusion Autocomplete in Xamarin provides a support to customize the height of popup window by using MaximumDropDownHeight property.


To add Popup height in Autocomplete follow the below given procedure:


Step 1: Create the autocomplete sample with all necessary assemblies.

Step 2: Create a class Countrylist, and create an instance for list called countryList and then add the countries in the list using the function Add ().

Step 3: Customize the popup height by setting MaximumDropDownHeight values.


The below code illustrates the way to achieve this.


Code snippet:

namespace Autocomplete
public partial class AutocompletePage : ContentPage
    public AutocompletePage()
        //Initialize the autocomplete control.
        SfAutoComplete autocomplete = new SfAutoComplete();
        autocomplete.MaximumDropDownHeight = 100;//Popup height customization.     
        //List to be shown in the autocomplete control
        List<string> countryList = new List<string>();
        countryList.Add("United States");
        countryList.Add("United Kingdom");
        autocomplete.AutoCompleteSource = countryList;
        //Layout for the autocomplete control
        StackLayout autocompleteLayout = new StackLayout();
        autocompleteLayout.Padding = new Thickness(50, 100, 50, 0);
        Content = autocompleteLayout;







Image for default Popup height:



Default popup height in SfAutoComplete



Image for Customized Popup Size “100”:



Customized popup height in SfAutoComplete


Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment