Articles in this section
Category / Section

How to Apply Full Rectangular Border to the .NET MAUI ComboBox?

2 mins read

This article demonstrates how to apply a full rectangular border to the .NET MAUI ComboBox on all platforms.

By default, the ComboBox has a full rectangular border on Mac and iOS platforms. However, on Windows and Android, it only has a bottom border. To achieve a consistent rectangular border across all platforms, you can set the ShowBorder property to False to remove the default border and then wrap the ComboBox inside a Border control. This approach allows you to fully customize the border’s color, thickness, and shape to achieve the desired appearance. Here’s how:

XAML

<Border
    Stroke="Red"
    StrokeShape="RoundRectangle 5">
    <editors:SfComboBox  
            ShowBorder="False"
            Placeholder="Select Here" >
        <editors:SfComboBox.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:SfComboBox.ItemsSource>
    </editors:SfComboBox>
</Border>

In this example, the Border control surrounding the SfComboBox enables full control over the border color, width, and shape. Here, we use a red rounded rectangle border with a radius of 5, creating a visually distinct ComboBox border.

Output:

ComboBoxBorder.png

Download the complete sample from the GitHub.

Conclusion

We hope you enjoyed learning how to customize the entire border color of the .NET MAUI ComboBox control.

For more information, refer to our .NET MAUI ComboBox’s feature tour page for additional capabilities. You can also explore our .NET MAUI ComboBox documentation for further details.

If you’re a Syncfusion customer, access our .NET MAUI components on the License and Downloads page. New to Syncfusion? Try our 30-day free trial to experience the .NET MAUI ComboBox (SfComboBox) and other powerful .NET MAUI components.

Feel free to reach out in the comments below with any questions or for further clarification. You can also contact us through our support forums, Direct-Trac, or feedback portal. We’re here to help!

ComboBoxSoftInputAdjustHandling.zip
Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied