Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
This example shows how to use the Text property to set the initial text contents of a TextBox control.
Note
Although the Extensible Application Markup Language (XAML) version of the example could use the <TextBox.Text> tags around the text of each button's TextBox content, it is not necessary because the TextBox applies the ContentPropertyAttribute attribute to the Text property. For more information, see XAML in WPF.
Use the Text property to set the text contents
<TextBox Name="tbSettingText">
Initial text contents of the TextBox.
</TextBox>
Set the Text Content of a TextBox Control
tbSettingText.Text = "Initial text contents of the TextBox.";
tbSettingText.Text = "Initial text contents of the TextBox."
See also
.NET Desktop feedback