DragEventArgs.Data property

Applies to Windows and Windows Phone

Gets or sets a data object (DataPackage) that contains the data associated with the corresponding drag event. This value is not useful in all event cases; specifically, the event must be handled by a valid drop target.

Syntax


public:
property DataPackage^ Data { 
   DataPackage^ get();
   void set (DataPackage^ value);
}

Property value

Type: DataPackage

The data object that contains data payload that is associated with the corresponding drag event.

Remarks

The Windows Runtime implementation of drag-drop concepts permits only certain controls and input actions to initiate a drag-drop action. There is no generalized DoDragDrop method that would permit any UI element to initiate a drag-drop action. The main source of a drag-drop action is when you drag the items of a list such as GridView. For a list item drag-drop action, the Data value in event data can potentially be modified from the control-defined default data about the item. This is done by handling the DragItemsStarting event, and working with the DataPackage object that is obtained from the DragItemsStartingEventArgs.Data property in the event data.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

ListViewBase
DragEventArgs
AllowDrop
UIElement.Drop

 

 

Show:
© 2014 Microsoft