Skip to main content

DropPosition Enum

Lists values that specify a record’s position after the drop operation.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v23.2.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public enum DropPosition

Members

Name Description
Append

A record is placed after all records.

Before

A record is placed before the target record.

After

A record is placed after the target record.

Inside

A record is placed inside the target group.

Related API Members

The following properties accept/return DropPosition values:

Remarks

Handle the DragRecordOver event and specify the DropPosition property to set the record’s position after the drop operation.

The following code sample demonstrates how to suppress the operation that moves the node to another child collection (the Inside drop position). The DropPositionRelativeCoefficient property contains a drop position offset relative to the target record:

<dxg:TreeListView AllowDragDrop="True" DragRecordOver="OnDragRecordOver" />
void OnDragRecordOver(object sender, DragRecordOverEventArgs e) {
   if(e.DropPosition == DropPosition.Inside) {
      e.DropPosition = e.DropPositionRelativeCoefficient > 0.5 ? DropPosition.After : DropPosition.Before;
      e.Handled = true;
   }
}

DragDropPosition2

See Also