ContainsText Method (TextDataFormat)
Collapse the table of content
Expand the table of content

Clipboard.ContainsText Method (TextDataFormat)

 

Queries the Clipboard for the presence of data in a text data format.

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

public static bool ContainsText(
	TextDataFormat format
)

Parameters

format
Type: System.Windows.TextDataFormat

A member of the TextDataFormat enumeration that specifies the text data format to query for.

Return Value

Type: System.Boolean

true if the Clipboard contains data in the specified text data format; otherwise, false.

Exception Condition
InvalidEnumArgumentException

format does not specify a valid member of TextDataFormat.

This method returns true only if the specified data format exists natively in the data object; this method does not check for the presence of auto-convertible data formats.

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft