我正在使用以下样式在文本框周围产生发光效果......但即使我增加 BlurRadius 的宽度,它也不会增加发光区域。
<TextBox.Style>
<Style TargetType="{x:Type TextBox}">
<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Opacity="1" ShadowDepth="0" Color="Red" BlurRadius="10" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
编辑: 文本框
<TextBox
x:Name="a"
DockPanel.Dock="Left"
MaxLength="11"
Height="20"
Width="67"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Right"
utils:InputMasking.Mask="^((\d{0,7})|(\d{0,7}\.\d{0,3}))$">
<TextBox.Text>
<Binding Path="abc.Value" NotifyOnValidationError="True" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay" />
</TextBox.Text>
</TextBox>