样式模板进行样式
<UserControl.Resources>
<Style TargetType="TextBox">
<Setter Property="BorderThickness" Value="5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Background="{TemplateBinding Background}"/>
<Border Grid.Column="1" x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" >
<ScrollViewer x:Name="PART_ContentHost" />
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
使用
<TextBox HorizontalAlignment="Left" Height="30" Margin="53,126,0,0" TextWrapping="Wrap" Text="输入用户名" VerticalAlignment="Top" Width="200">
<TextBox.Background>
<ImageBrush ImageSource="Img/1.jpg"/>
</TextBox.Background>
</TextBox>
https://blog.csdn.net/xionglifei2014/article/details/85002176
https://www.cnblogs.com/anding/p/4970845.html
https://blog.csdn.net/oneonce/article/details/77072894