ac-lap
ac-lap

Reputation: 1653

How to programmatically copy/paste in windows phone 8?

Is there a way to programmatically copy/paste text in windows phone 8. I want to copy the contents from the clipboard when user clicks a button.

Any thoughts?

Upvotes: 3

Views: 1121

Answers (2)

Ajay GU
Ajay GU

Reputation: 538

You can use SetText method from Clipboard Class. The text will be copied into the mobile clipboard. Since GetText method will cause an exception, you can instruct the user, to hold the edit area until the paste option will appear, then the user can paste it from that option.

Upvotes: 1

A.K.
A.K.

Reputation: 3331

if the control is a clipboard then

You cannot get clipboard text from a Windows Phone application, only set it. Calling the GetText method in a Windows Phone application will always cause a SecurityException to occur.

You can only set text to clipboard in windows phone and can not read it.

check this link

Upvotes: 1

Related Questions