Export (0) Print
Expand All
Expand Minimize

DataObjectPastingEventHandler Delegate

Represents a method that handles DataObject.Pasting events.

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

public delegate void DataObjectPastingEventHandler (
	Object sender,
	DataObjectPastingEventArgs e
)
/** @delegate */
public delegate void DataObjectPastingEventHandler (
	Object sender, 
	DataObjectPastingEventArgs e
)
In XAML, you can use delegates but you cannot define your own.

Parameters

sender

The current element along the event's route.

e

A DataObjectPastingEventArgs object containing the arguments associated with the Pasting event.

The Pasting event occurs when a paste operation has selected a data format to paste, but before the data is actually pasted.

Actions typically performed by a Pasting event handler include:

  • Change the selected paste format by setting new value for the FormatToApply property.

  • Apply a custom data format to the paste selection.

  • Create a new DataObject, and assign it to the DataObject property of e. A read-only copy of the original data object is stored in SourceDataObject.

  • Cancel the paste operation by calling CancelCommand.

Important   If the paste format is changed, the handler method is responsible for ensuring that a newly selected paste format is consumable by the paste target.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft