In WinRT-XAML; prevent paste into TextBox

windows-8.1, winrt-xaml

Solution

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`.

Problem

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?

Original source