DragRecordOverEventArgs.DropPositionRelativeCoefficient Property

Gets a number between 0 and 1, presenting a drop position relative to the target record.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v21.1.dll


public double DropPositionRelativeCoefficient { get; }

Property Value

Type Description

A number that presents a drop position relative to the target record.


The following code sample demonstrates how to prohibit end-users from moving nodes to another node’s child collection:

<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;

In this code sample, the DropPositionRelativeCoefficient property is used to determine the exact drop position.

The DropPosition enumeration lists possible drop position values.

See Also