DataObject.AddSettingDataHandler Method (DependencyObject, DataObjectSettingDataEventHandler)
Adds a SettingData event handler to a specified dependency object.
Assembly: PresentationCore (in PresentationCore.dll)
Public Shared Sub AddSettingDataHandler ( element As DependencyObject, handler As DataObjectSettingDataEventHandler )
The SettingData event occurs as part of a copy or drag command, once for each of the data formats to add to the associated data object. Typically, this event is connected to a content control, such as TextBox.
A handler for this event can be used to selectively prevent unwanted data formats from being added to the data object, thus eliminating data conversion processing for redundant data formats and improving the overall performance of a copy operation. To skip a particular data format, call the CancelCommand method and specify the format to skip in the Format property. Calling the CancelCommand method for this event does not cancel the associated copy or drag command.
Available since 3.0