Back to Devexpress

TileView.BeforeItemDrag Event

windowsforms-devexpress-dot-xtragrid-dot-views-dot-tile-dot-tileview-800eadfd.md

latest3.3 KB
Original Source

TileView.BeforeItemDrag Event

Fires when a tile drag operation is about to be started. Allows you to provide a drag image, or to cancel the operation. This event does not fire when you enable drag-and-drop using Drag And Drop Behavior.

Namespace : DevExpress.XtraGrid.Views.Tile

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Action")]
public event TileViewBeforeItemDragEventHandler BeforeItemDrag
vb
<DXCategory("Action")>
Public Event BeforeItemDrag As TileViewBeforeItemDragEventHandler

Event Data

The BeforeItemDrag event's data class is BeforeItemDragEventArgs. The following properties provide information specific to this event:

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
DragImageGets or sets the image that represents the tile during the drag-and-drop operation.
RowHandleGets the row handle that identifies the current tile.

Remarks

Use the TileView.OptionsDragDrop.AllowDrag setting to enable the built-in tile drag-and-drop feature.

The BeforeItemDrag event fires when a drag operation is initiated by an end-user. The event allows you to do the following:

  • Prevent the drag operation from starting, by setting the event’s Cancel parameter to true.
  • Provide a custom drag image for the drag operation with the event’s DragImage parameter. Initially, this parameter contains the default drag image, which was created from the tile being dragged.

See Also

AllowDrag

AllowItemDrag

DropTargetGroups

BeforeItemDrag

BeforeItemDrop

ItemDrag

ItemDrop

TileView Class

TileView Members

DevExpress.XtraGrid.Views.Tile Namespace