Intersoft.Client.UI.Controls.Interactivity Namespace > ISDragDrop Class : AllowDropProperty Field |
Public Shared ReadOnly AllowDropProperty As DependencyProperty
Dim value As DependencyProperty value = ISDragDrop.AllowDropProperty
public static readonly DependencyProperty AllowDropProperty
public: static readonly DependencyProperty^ AllowDropProperty
The following code demonstrates how to make an UIElement droppable by using the ISDragDrop.AllowDrop attached property.
XAML |
Copy Code
|
---|---|
<ListBox HorizontalAlignment="Center" Height="100" VerticalAlignment="Center" Width="100" Intersoft:ISDragDrop.AllowDrop="True"> </ListBox> |
To make an UIElement droppable, you can choose one of the following approaches:
AllowDrop property is only available in SL4 and WPF. |
This approach is only used to mark the UIElement as a droppable element. It does not include built-in handling such as in DropTargetBehavior thus requires you to write additional logic at the Drop event. To learn how to handle Drop event, see How to: Copy the dragged object when dropped to the drop target and How to: Remove the drag object when dropped to drop target.
Since Silverlight 3 does not have AllowDrop property in UIElement, the ISDragDrop.AllowDrop attached property is introduced to maintain code compatibility across Silverlight 3, Silverlight 4 and WPF. |
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