<TextBox >
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="40"/>
<Setter Property="BorderBrush" Value="Red"/>
</Style>
</TextBox.Resources>
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="40"/>
<Setter Property="BorderBrush" Value="Red"/>
</Style>
</TextBox.Resources>
</TextBox>
上述可生成角度40 红色边框的圆角文本框。