tags:

views:

40

answers:

2

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

+1  A: 

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

Branimir
can't do that currently due to some reason.
saurabh
The proper property name is "IsReadOnly"
Wonko the Sane
@Wonko the SaneYou are right, thank you
Branimir
A: 

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.

inam101
in WPF , if control is disabled than context menu will not work.
saurabh
on the other hand, you can also make the textbox read-only and make the cursor an ordinary pointer for that textbox. There is some way around, a stupid but working trick.
inam101