Redigera

Dela via


DataObjectPastingEventArgs(IDataObject, Boolean, String) Constructor

Definition

Initializes a new instance of DataObjectPastingEventArgs.

public:
 DataObjectPastingEventArgs(System::Windows::IDataObject ^ dataObject, bool isDragDrop, System::String ^ formatToApply);
public DataObjectPastingEventArgs (System.Windows.IDataObject dataObject, bool isDragDrop, string formatToApply);
new System.Windows.DataObjectPastingEventArgs : System.Windows.IDataObject * bool * string -> System.Windows.DataObjectPastingEventArgs
Public Sub New (dataObject As IDataObject, isDragDrop As Boolean, formatToApply As String)

Parameters

dataObject
IDataObject

A DataObject containing the data to be pasted.

isDragDrop
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
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.

Exceptions

Raised when dataObject or formatToApply is null.

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

Remarks

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

Applies to