Intersoft ClientUI Documentation
AllowDropItem Property
See Also  Send Feedback
Intersoft.Client.UI.Controls.Interactivity Namespace > DropTargetBehavior Class : AllowDropItem Property






Gets or sets a value that determines whether the associated object is dropable.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Behavior")>
Public Property AllowDropItem As Boolean
Visual Basic (Usage)Copy Code
Dim instance As DropTargetBehavior
Dim value As Boolean
 
instance.AllowDropItem = value
 
value = instance.AllowDropItem
C# 
[CategoryAttribute("Behavior")]
public bool AllowDropItem {get; set;}
Delphi 
public read-write property AllowDropItem: Boolean; 
JScript 
CategoryAttribute("Behavior")
public function get,set AllowDropItem : boolean
Managed Extensions for C++ 
[CategoryAttribute("Behavior")]
public: __property bool get_AllowDropItem();
public: __property void set_AllowDropItem( 
   bool value
);
C++/CLI 
[CategoryAttribute("Behavior")]
public:
property bool AllowDropItem {
   bool get();
   void set (    bool value);
}

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>

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.

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.