3

I have a TextBox disabled but would like the user to still be able to copy its content to the clipboard. However when IsEnabled is not set copy/paste is not allowed.

Is there a way to achieve this?

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
Johannes Schacht
  • 930
  • 1
  • 11
  • 28

1 Answers1

6

You're not really supposed to interact with a "disabled" control.

Instead, set the TextBox.IsReadOnly property to true.

If you want it to "look" disabled, you could set the background color to grey, like it is when it is disabled.

Community
  • 1
  • 1
Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328