Intersoft ClientUI Documentation
AllowNextDropProperty Field

Identifies the AllowNextDrop dependency property.
Public Shared ReadOnly AllowNextDropProperty As DependencyProperty
Dim value As DependencyProperty
value = ISDragDrop.AllowNextDropProperty
public static readonly DependencyProperty AllowNextDropProperty
static readonly DependencyProperty^ AllowNextDropProperty

By default, when you enable the AllowReorderItem or AllowDropItem property in an UXPanel, all children elements in the panel will be queried to accept the dragged object. A children element will show an empty space in its left or the right position which indicates that the element can accept the dragged object to drop into the provided empty space.

In certain scenarios, you may want to restrict the dragged object from being dropped to the left or right side of a certain element in the panel.

The following code shows how to prevent drop using the ISDragDrop.AllowNextDrop and ISDragDrop.AllowPreviousDrop attached property.

Copy Code
<Grid Width="600" Height="200" Background="White">
    <Intersoft:UXStackPanel HorizontalAlignment="Center" VerticalAlignment="Center" DragMode="Move" AllowMoveItem="True" AllowDropItem="True" AllowReorderItem="True">
        <Rectangle Intersoft:ISDragDrop.AllowNextDrop="False" Intersoft:ISDragDrop.AllowPreviousDrop="False" Fill="#FFFF2222" Height="100" Stroke="Black" Width="100" StrokeThickness="0"/>
        <Rectangle Fill="#FFE7FF5B" Height="100" Stroke="Black" Width="100" StrokeThickness="0"/>
        <Rectangle Fill="#FF88FF8F" Height="100" Stroke="Black" Width="100" StrokeThickness="0"/>
        <Rectangle Fill="#FF9ABCF3" Height="100" Stroke="Black" Width="100" StrokeThickness="0"/>

In the above illustration, the green rectangle is moved to the area between the red and the yellow rectangle. Since the red rectangle has the ISDragDrop.AllowNextDrop set to False, the green rectangle can not be dropped in the area between the read and the yellow rectangle. Notice that the animation that opens the empty space will not be performed in this case. 


Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also


ISDragDrop Class
ISDragDrop Members


Interactive Panels Overview

Send Feedback