Copy to clipboard from disabled textbox

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

Is there a way to achieve this?


source to share

1 answer

You shouldn't actually interact with a "disabled" control.

Set the property TextBox.IsReadOnly

to true instead .

If you wanted it to "look" disabled, you could set the background color to gray as if it were disabled.



All Articles