TextBox

Another typical control that is also provided by WPF is the TextBox. You declare one as follows:

image

The most common event is TextChanged that is raised when the text is modified and that can be handled as follows:

image

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 provides support for undo actions (that is, Ctrl+Z) and a SelectedText property that enables you to easily retrieve in VB code the currently selected text ...

Get Visual Basic® 2010 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.