Silverlight 3: How to implement Textblock copy / paste functionality?

Silverlight is awesome, most of my app users give positive reviews about silverlight. However, some users cannot live without copy / paste. They are very often used to copy / paste the functionality provided by an HTML page.

How can I implement such a context menu as well as copy / paste functions?

PS: The Windows-only solution is fine too.

+3
source share
3 answers

TextBox IsReadOnly = true, / TextBlock. , / TextBox . , TextBlock's.

, , TextBox, .

DOM , , - . Silverlight 4 API , -.

+3

, TextBox TextBlock. :

, CTRL+C, CTRL+X CTRL+V - Silverlight 4:

string content = Clipboard.GetText();
Clipboard.SetText("hello world");

, Silverlight 4 -, IE. Popup ChildWindow Vectorlight:

alt text

+1
0
source

Source: https://habr.com/ru/post/1735169/


All Articles