1,新增WPF用户控件
WPF控件的TextBox为例:
<TextBox
HorizontalAlignment="Center"
VerticalAlignment="Center"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
Name="RemarksTxt"
Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=RemarksValue}" Height="45" MaxHeight="45" MinHeight="45" Margin="43,1,-1,1" Width="175" MaxWidth="180" MinWidth="180" FontSize="18" IsReadOnly="True" />
1,Text 赋值: