Export (0) Print
Expand All

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.

ExceptionCondition
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

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2015 Microsoft