Introduction: TextBox Control is very important control for designing user interface in our application for text input. it support single-line and multiline text entry.

For example, we take a silverlight application and take a TextBox, a TextBlock and a Button control. We write the following code on Button Click event.

Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
TextBlock1.Text = TextBox1.Text
End
Sub

Then we run the application. The TextBox will accept only single line input. On Button Click, TextBlock shows the text of TextBox. Like figure 1

TextBox

Figure-1

Now we set multiline property to TextBox by Checking the CheckBox of AcceptsReturn property of TextBox. Again we run the application. Now output will be like below figure

TextBox

Figure-2