DataObjectPastingEventArgs.DataObject Property

 

Gets or sets a suggested DataObject to use for the paste operation.

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

public IDataObject DataObject { get; set; }

Property Value

Type: System.Windows.IDataObject

The currently suggested DataObject to use for the paste operation.

Getting this value returns the currently suggested DataObject for the paste operation.

Setting this value specifies a new suggested DataObject to use for the paste operation.

Exception Condition
ArgumentNullException

Raised when an attempt is made to set this property to null.

ArgumentException

Raised when an attempt is made to set this property to a data object that contains no data formats.

Initially this property contains a DataObject that is identical to that stored in the SourceDataObject property. Custom pasting event handlers can specify a new suggested DataObject to paste by setting this property.

A DataObject stored in this property must have at least one data format, the first of which is automatically applied to the FormatToApply property when this property is set.

.NET Framework
Available since 3.0
Return to top
Show: