ウィンドウ内のすべてのTextBoxの境界線を赤いOnMouseOverに設定しようとする以下のXAMLがあります。マウスをテキストボックスの上に置くと、FontSizeプロパティとForegroundプロパティが設定されますが、BorderBrushは、以前のデフォルト値に戻る前に一時的に設定されます。マウスがテキストボックス上になくなるまで、BorderBrushを赤のままにしておきます。なぜこれが起こるのか考えはありますか?
<Window x:Class="StylesApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Width" Value="250" />
<Setter Property="Height" Value="50" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="FontSize" Value="20" />
<Setter Property="Foreground" Value="Red" />
<Setter Property="BorderBrush" Value="Red" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<TextBox>
My TextBox
</TextBox>
</Grid>
</Window>