TalentTuner
TalentTuner

Reputation: 17556

Copy Option in textbox

is it possible to enable copy command on a textbox which is having IsEnabled property set to false in wpf?

Upvotes: 2

Views: 462

Answers (2)

Branimir
Branimir

Reputation: 4367

Set the 'IsReadOnly' property to true, copy command would be enabled and textbox uneditable.

Upvotes: 3

inam101
inam101

Reputation: 92

add a context menu to the form which will be displayed only if right-clicked on the disabled textbox. the context menu will have only one option, copy. in its event handler, copy the textbox content to the clipboard.

Upvotes: -1

Related Questions