none
how to enable selection/copy/paste for textblock content in SL?

    Question

  •  As MS said, SL4 supports copy/paste, but for textblock, it's still no way to allow users to select the text and copy and paste.

    Is there any solution for this request?

    Sunday, January 24, 2010 12:30 PM

Answers

  • If there is no build-in functionality in sl4 for copy-paste in textblock elements, than you have to workaround this.

    Unfortunatly TextBlock is a sealed class, so you can't derive from it and add the functionality of selecting the text by your self.

    But what you could do is, to take a TextBox, set it to readonly and style it to look like plain text.

    Then you can use this textbox for longer paragraphs where you want provide copy and paste.

    Sunday, January 24, 2010 1:44 PM

All replies

  •  Do you mean TextBox or really TextBlock? For TextBox it works out of the Box. For TextBlock i think you need to do something with the new Clipboard-class.

    Sunday, January 24, 2010 12:37 PM
  •  I'm talking about TextBlock. Clipboard class only give you the function copy/paste, No mouse drag for selection(select part of the text of TextBlock)

    Sunday, January 24, 2010 1:36 PM
  • If there is no build-in functionality in sl4 for copy-paste in textblock elements, than you have to workaround this.

    Unfortunatly TextBlock is a sealed class, so you can't derive from it and add the functionality of selecting the text by your self.

    But what you could do is, to take a TextBox, set it to readonly and style it to look like plain text.

    Then you can use this textbox for longer paragraphs where you want provide copy and paste.

    Sunday, January 24, 2010 1:44 PM
  •  Did you also look at the new RichTextArea-control?

    Sunday, January 24, 2010 2:00 PM
  • Dear Microsoft, Copy/Paste is an important feature for me. There should be a property to allow copy paste in TextBlock.

    Saturday, February 20, 2010 11:56 AM
  • Agree adding copy paste feature like we use to do with HTML based pages, would be great and something that will give a diferential factor from other ria technolgies like Flash / Flex.

    Copy paste would be nice to cover several paste targets:

    • XAML
    • HTML
    • RTF
    • ... what else? :) 

    Cheers

     

    Sunday, February 28, 2010 7:51 AM
  • Count me in too.... This is a very basic feature people used to.. I was surprised it is not in SL4 !

    Saturday, March 20, 2010 11:51 AM
  • Thomas -

    Regarding this...

    >>> For TextBox it works out of the Box

    ...how is that the case because it is not working for me? Is there a way to enable it? Is there some property to set to get it turned-on?

    Please advise.

    Thank you.

    - Mark Kamoski


    Wednesday, February 09, 2011 2:40 PM