DataObject.AddSettingDataHandler Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a SettingData event handler to a specified dependency object.
public:
static void AddSettingDataHandler(System::Windows::DependencyObject ^ element, System::Windows::DataObjectSettingDataEventHandler ^ handler);
public static void AddSettingDataHandler (System.Windows.DependencyObject element, System.Windows.DataObjectSettingDataEventHandler handler);
static member AddSettingDataHandler : System.Windows.DependencyObject * System.Windows.DataObjectSettingDataEventHandler -> unit
Public Shared Sub AddSettingDataHandler (element As DependencyObject, handler As DataObjectSettingDataEventHandler)
- element
- DependencyObject
The dependency object (a UIElement or ContentElement) to which to add the event handler.
A delegate that references the handler method to add.
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.
Προϊόν | Εκδόσεις |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET σχόλια
.NET είναι ένα έργο ανοιχτού κώδικα. Επιλέξτε μια σύνδεση για να παρέχετε σχόλια: