Reputation: 31831
I have a TextBox and I don't want the user to Paste into it.
How do I prevent paste?
Also is a drop of text from another app into a TextBox a Paste event?
Upvotes: 3
Views: 217
Reputation: 19897
As of Windows 8.1, the Windows.UI.XAML.TextBox
control has a Paste
event handler which fires before the content is inserted into the control. If you set the Handled
property to true
, the text will not be inserted into the TextBox
.
Upvotes: 5