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






Identifies the AllowDrop dependency property.

Syntax

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

Example

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>

Remarks

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

  • Attach a DropTargetBehavior
  • Set the ISDragDrop.AllowDrop attached property to True
  • Set the AllowDrop property to  True
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.

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.