Intersoft ClientUI Documentation
AllowPreviousDropProperty Field
See Also  Send Feedback
Intersoft.Client.UI.Controls.Interactivity Namespace > ISDragDrop Class : AllowPreviousDropProperty Field






Identifies the AllowPreviousDrop dependency property.

Syntax

Visual Basic (Declaration) 
Public Shared ReadOnly AllowPreviousDropProperty As DependencyProperty
Visual Basic (Usage)Copy Code
Dim value As DependencyProperty
 
value = ISDragDrop.AllowPreviousDropProperty
C# 
public static readonly DependencyProperty AllowPreviousDropProperty
Delphi 
public field AllowPreviousDropProperty: DependencyProperty; static; readonly 
JScript 
public static var AllowPreviousDropProperty : DependencyProperty;
Managed Extensions for C++ 
public: static readonly DependencyProperty* AllowPreviousDropProperty
C++/CLI 
public:
static readonly DependencyProperty^ AllowPreviousDropProperty

Remarks

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.

XAML 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"/>
    </Intersoft:UXStackPanel>
</Grid>

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. 

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.