DataObject::SetData Method (Object)

Stores the specified data in this data object, automatically determining the data format from the source object type.

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

public:
virtual void SetData(
	Object^ data
) sealed

Parameters

data
Type: System::Object

An object that represents the data to store in this data object.

Implements

IDataObject::SetData(Object)

ExceptionCondition
ArgumentNullException

data is nullptr.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

  • UIPermission 

    for permission to transfer data to the system Clipboard. Associated enumeration: AllClipboard.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft