<Window.Resources>
<Style x:Key="CommonTextBoxStyle" TargetType="TextBox">
<Setter Property="Background" Value="LightGray"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Padding" Value="5"/>
</Style>
</Window.Resources>
<TextBox Style="{StaticResource CommonTextBoxStyle}" Width="200" Height="30"/>
<TextBox>
<TextBox.Style>
<Style TargetType="TextBox" BasedOn="{StaticResource CommonTextBoxStyle}">
<!-- 这里可以添加其他的 Setter 来扩展样式 -->
</Style>
</TextBox.Style>
</TextBox>
08-06
1555
06-29
803
08-14
1033