DataObjectPastingEventArgs Constructor (IDataObject, Boolean, String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of DataObjectPastingEventArgs.

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

public DataObjectPastingEventArgs(
	IDataObject dataObject,
	bool isDragDrop,
	string formatToApply
)

Parameters

dataObject
Type: System.Windows.IDataObject

A DataObject containing the data to be pasted.

isDragDrop
Type: System.Boolean

A Boolean value indicating whether the paste is part of a drag-and-drop operation. true to indicate that the paste is part of a drag-and-drop operation; otherwise, false. If this parameter is set to true, a Pasting event is fired on drop.

formatToApply
Type: System.String

A string specifying the preferred data format to use for the paste operation. See the DataFormats class for a set of predefined data formats.

Exception Condition
ArgumentNullException

Raised when dataObject or formatToApply is null.

ArgumentException

Raised when formatToApply specifies a data format that is not present in the data object specified by dataObject.

A DataObjectPastingEventArgs object is typically created by the application that is initiating the paste operation.

.NET Framework
Available since 3.0
Return to top
Show: