When handling the PreviewTextInput
event of a TextBox in WPF, can the Text property of the event argument (TextCompositionEventArgs
) contain other than the last character input via the keyboard?
I gave it a thorough test and it seems to contain only the single character value of the last pressed key. However, I'm probably missing something obvious, as its type is String
and not Char
.
From UIElement.PreviewTextInput documentation.
The keyboard is the primary means of PreviewTextInput; but speech, handwriting, and other input devices can also generate PreviewTextInput.
I would assume that non-keyboard sources are able to provide more than one letter at a time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With