Clipboard.ContainsText Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Queries the clipboard for the presence of data in the UnicodeText format.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)


Public Shared Function ContainsText As Boolean
public static bool ContainsText()

Return Value

Type: System.Boolean
true if the system clipboard contains Unicode text data; otherwise, false.


ContainsText can be invoked from any context and is not limited a context that is determined by the Silverlight runtime to be in response to a user-initiated action.

Version Information


Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.