Hello,
I want to remove the border when I select the button by pressing tab key
Please open the app.xaml file in the Platforms/Windows/Windows/ folder.
Then add following styles of <maui:MauiWinUIApplication.Resources> in the <maui:MauiWinUIApplication> tag. Set UseSystemFocusVisuals to false, then this border will be removed.
<maui:MauiWinUIApplication
x:Class="MauiButtonBorder.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:MauiButtonBorder.WinUI">
<!--Add following resources-->
<maui:MauiWinUIApplication.Resources>
<Style TargetType="Button">
<Setter Property="UseSystemFocusVisuals" Value="False"/>
</Style>
</maui:MauiWinUIApplication.Resources>
</maui:MauiWinUIApplication>
Best Regards,
Leon Lu
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.