1

I have copy paste button like this. Whenever I select some text, this copy button is becoming active. Which is correct behavior.

<Button Name="CopyButton"
        Grid.Row="0"
        Grid.Column="1"
        VerticalAlignment="Top"
        Margin="6,6,3,0"
        ToolTip="{x:Static res:Controls.Copy}"
        Command="ApplicationCommands.Copy">
  <Image Source="../Resources/Images/GenericEditorActions/Copy.png"
         x:Name="CopyImage" />
</Button>

Now my question is, I have one textbox in my application. Above Copy button should always be in in-active state even I select Text from that textbox. As per req. that textbox should not support any copy paste functionality.

How would I do that?

Pls help

Daniel
  • 10,864
  • 22
  • 84
  • 115
user2203652
  • 67
  • 2
  • 8
  • 1
    See here: http://stackoverflow.com/questions/3051144/how-to-suppress-cut-copy-and-paste-operations-in-textbox-in-wpf ... and here ...http://stackoverflow.com/questions/938145/make-wpf-textbox-as-cut-copy-and-paste-restricted – Colin Smith Jun 21 '13 at 19:55
  • I dont want to prevent copy paste functionality of textbox, but In my application we have button for copy paste as I mentioned above. That copy paste button needs to be disable for that textbox. Ctrl + C and Ctrl + V should work. Becoz that button should have some kind of scope and textbox is out of that scope – user2203652 Jun 23 '13 at 17:25

0 Answers0