How to remove outer border of the searchbar in MAUI

Sowndarrajan Vijayaragavan 330 Reputation points
2023-06-02T04:42:21.4366667+00:00

Need to hide the outer border.

User's image

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,900 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 35,806 Reputation points Microsoft Vendor
    2023-06-02T06:08:57.6466667+00:00

    Hello,

    You could refer to the solution proposed in the How to redesign the searchbar in .NET MAUI and put the corresponding Style into App.xaml.

    Then, you could search for <Setter Property="BorderThickness" in <Style TargetType="TextBox" x:Key="AutoSuggestBoxTextBoxStyle"> code block.

    After that, you need to set the value of BorderThickness to 0 to remove outer border:

    <Setter Property="BorderThickness" Value="0" />

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful