Hi @杨岑 ,
The default template of Textbox
can be found in generic.xaml
in: C:\Program Files (x86)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\{version}\Generic.
You can also right-click the Textbox control in Xaml Desginer Window, select Edit Template->Edit a Copy, then you can get a new Style resource code of the Textbox control in xaml.
Find the resource TextControlBorderBrushFocused
and TextControlBorderBrushPointerOver,
modify their value with new SolidColorBrush
.
<Page.Resources>
<StaticResource x:Key="TextControlBorderBrushFocused"
ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
<StaticResource x:Key="TextControlBorderBrushPointerOver"
ResourceKey="SystemControlForegroundBaseMediumLowBrush" />
</Page.Resources>
<Grid>
<StackPanel>
<TextBox Height="50" Width="200"/>
<TextBox Height="50" Width="200"/>
</StackPanel>
</Grid>
Thank you.
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.