DataObject.SetText Method (String, TextDataFormat)

 

Stores text data in this data object. The format of the text data to store is specified with a member of TextDataFormat.

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

public void SetText(
	string textData,
	TextDataFormat format
)

Parameters

textData
Type: System.String

A string that contains the text data to store in the data object.

format
Type: System.Windows.TextDataFormat

A member of TextDataFormat that specifies the text data format to store.

Exception Condition
ArgumentNullException

textData is null.

This method adds data with auto-conversion disabled (the same as calling SetData(String, Object, Boolean) with autoConvert set to false).

.NET Framework
Available since 3.0
Return to top
Show: