Placing Text on the Clipboard

The static System.Windows.Clipboard class allows you to place text on the systemwide clipboard, or to detect whether any text exists on the clipboard.

Note

You cannot retrieve the clipboard text from a Windows Phone app, only set it. Calling the GetText method raises a SecurityException.

Clipboard contains the following three methods:

Image ContainsText()Queries the clipboard for the presence of text. Returns true if text is present; otherwise, false.

Image SetText(string text)Places text in the clipboard.

GetText()Raises ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.