4

In WPF how to create a textblock with copy text option (OR) a text box with text trimming option. Any control template needed? If yes, please let us know hpw to build it. Please help.

Sukan

Sukan
  • 61
  • 1
  • 1
  • 4
  • possible duplicate of [Any way to make a WPF textblock selectable?](http://stackoverflow.com/questions/136435/any-way-to-make-a-wpf-textblock-selectable) – user7116 Jun 25 '13 at 19:03

1 Answers1

-1

First part is a duplicate of Any way to make a WPF textblock selectable?.

TextTrimming is a property in the TextBox.

Community
  • 1
  • 1
Jobi Joy
  • 49,102
  • 20
  • 108
  • 119
  • The other question of the same sort is not answered. A control template is not an attribute of a textblock so how to create one? Also there is no 'TextTrimming' property in TextBox. Am I mistaking something? Please help. – Sukan Mar 04 '10 at 12:06
  • Template is the attribute a ControlTemplate would be assigned to, for any WPF control. – opedog Mar 04 '10 at 18:13
  • There is no option of designing Template for a textblock. I would like to extend on textblock a copy to clipboard feature because 1. TextBlock is the light weight component 2. Textblock already has texttrimming and wrapping and noteditable options. Only copy to clipboard is the requirement. Is there any other option? Please help. – Sukan Mar 10 '10 at 12:06
  • Temporarily I have used a Grid with textblock and textbox with textbox foreground property set to transparent. It is not the right way to do, but since there are only 2 to 3 places where I would need this control , I have used this. Please suggest if any concerns available. Thanks in advance. – Sukan Mar 17 '10 at 11:52