Intersoft ClientUI Documentation
AllowDropItem Property (DropTargetBehavior)



Gets or sets a value that determines whether the associated object is dropable.
Syntax
<CategoryAttribute("Behavior")>
Public Property AllowDropItem As Boolean
Dim instance As DropTargetBehavior
Dim value As Boolean
 
instance.AllowDropItem = value
 
value = instance.AllowDropItem
[CategoryAttribute("Behavior")]
public bool AllowDropItem {get; set;}
[CategoryAttribute("Behavior")]
public:
property bool AllowDropItem {
   bool get();
   void set (    bool value);
}
Remarks

To make an UIElement droppable, you can choose one of the following approaches:

AllowDrop property is only available in SL4 and WPF.

The AllowDropItem property determines whether the attached element is dropable.

Example

The following code demonstrates how to make an UIElement droppable using DropTargetBehavior.

Dropable Grid Element
Copy Code
<Grid HorizontalAlignment="Center" Height="100" VerticalAlignment="Center" Width="100" Background="Gray" AllowDrop="True">
    <i:Interaction.Behaviors>
        <Intersoft:DropTargetBehavior AllowDropItem="True" TooltipIcon="accept.png" TooltipText="Drop here."/>
    </i:Interaction.Behaviors>
</Grid>
Dropable ListBox
Copy Code
<ListBox HorizontalAlignment="Center" Height="100" VerticalAlignment="Center" Width="100">
    <i:Interaction.Behaviors>
        <Intersoft:DropTargetBehavior AllowDropItem="True" DropBehavior="Custom"  TooltipIcon="accept.png" TooltipText="Drop here."//>
    </i:Interaction.Behaviors>
</ListBox>
Requirements

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

Reference

DropTargetBehavior Class
DropTargetBehavior Members

Concepts

Drag-drop Framework Overview

Send Feedback