Back to Devexpress

DropPosition Enum

wpf-devexpress-dot-xpf-dot-core-79476829.md

latest2.3 KB
Original Source

DropPosition Enum

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

Namespace : DevExpress.Xpf.Core

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public enum DropPosition
vb
Public Enum DropPosition

Members

NameDescription
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.

|

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:

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

See Also

DevExpress.Xpf.Core Namespace