Reputation: 1653
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
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
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