Articles in this section

How to restrict maximum height of the DropDown in the .NET MAUI Autocomplete?

This article demonstrates how to restrict the maximum height of the dropdown in the .NET MAUI Autocomplete (SfAutocomplete). The MaxDropDownHeight property customizes the dropdown’s height in the Autocomplete. The default value of the MaxDropDownHeight property is 400d.

Note: If the MaxDropDownHeight is too small compared to the populated items, a scroll viewer will be automatically shown to navigate the hidden items.

XAML

<editors:SfAutocomplete MaxDropDownHeight="100"
                        WidthRequest="280">
    <editors:SfAutocomplete.ItemsSource>
        <x:Array Type="{x:Type x:String}">
            <x:String>Uganda</x:String>
            <x:String>Ukraine</x:String>
            <x:String>United States</x:String>
            <x:String>United Kingdom</x:String>
            <x:String>Uzbekistan</x:String>
        </x:Array>
    </editors:SfAutocomplete.ItemsSource>
</editors:SfAutocomplete>

Output

Default height of DropDown

WithoutMax.gif

Setting MaxDropDownHeight to 100

WithMax.gif

Conclusion

I hope you enjoyed learning how to restrict the maximum height of the dropdown in the .NET MAUI Autocomplete (SfAutocomplete).

For more features, visit our .NET MAUI Autocomplete’s feature tour and explore the .NET MAUI Autocomplete documentation for presenting and manipulating data.

For current customers, access our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial for the .NET MAUI Autocomplete (SfAutocomplete) and other components.

Please let us know in the comments section below if you have any queries or require clarification. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied