Entering Text with the TextBox Control
Another typical control that is also provided by WPF is the TextBox
. You declare one as follows:
<TextBox Name="TextBox1" TextChanged="TextBox1_TextChanged"/>
The most common event is TextChanged
that is raised when the text is modified and that can be handled as follows:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls. TextChangedEventArgs)End Sub
The e
object of type TextChangedEventArgs
offers a Changes
collection property that can be iterated to get a list of changes that affect the control’s content. The TextBox
control ...
Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.