How to remove outer border of the searchbar in MAUI

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

Need to hide the outer border.

User's image

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,126 Reputation points Microsoft External Staff
    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.