TextBox exposes straightforward and familiar members for text selection—
GetRectFromCharacterIndex. However, unlike
RichTextBlock, these are based on simple
int character indices rather than
In addition to the Select All and Copy commands supported by
TextBox’s editable nature enables it to provide automatic support for Cut, Paste, Undo, and Redo as well. The availability of every command except Select All depends on context, but Figure 12.20 shows the built-in context menu when every command is available.