Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.41 KB

listviewbase_dragitemsstarting.md

File metadata and controls

35 lines (23 loc) · 1.41 KB
-api-id -api-type
E:Microsoft.UI.Xaml.Controls.ListViewBase.DragItemsStarting
winrt event

Microsoft.UI.Xaml.Controls.ListViewBase.DragItemsStarting

-description

Occurs when a drag operation that involves one of the items in the view is initiated.

-xaml-syntax

<listViewBase DragItemsStarting="eventhandler" />

-remarks

Important

In order to receive this event, the CanDragItems property must be set to true.

This event occurs when you start a drag-and-drop operation, including when you perform a reorder operation by drag-and-drop. When you perform custom actions as a result of a drag-and-drop operation, you typically listen to this event and provide more data using the DragItemsStartingEventArgs.Data property.

You can inspect the items being dragged by checking the DragItemsStartingEventArgs.Items property.

You can cancel the drag operation by setting the DragItemsStartingEventArgs.Cancel property to true.

-examples

-see-also

DragItemsStartingEventArgs, Drag and drop sample (Windows 10)