I want to remove the flashing dash from a TextBox when the user presses it and to stop the user from being give the option to select and copy text.
Is this possible?
Depending on what you need exactly, there are many ways you can achieve this.
Call Clipboard.SetText("")
whenever GotFocus
and LostFocus
events are triggered.
Override SelectionChanged
and do e.Handled = true
.
Create your own custom control by inheriting TextBox
, set a custom Template, and manually add/remove characters for every KeyDown
event.
There doesn't seem to be a way to change the flashing caret/cursor on Windows Universal apps, and there is no way to disable the clipboard either.