Intersoft ClientUI Documentation
DragDropPointBehavior Class
Members  See Also  Send Feedback
Intersoft.Client.UI.Controls.Interactivity Namespace : DragDropPointBehavior Class






Provides attached control with drag drop capability. The attached object must be the inner element / part of a complex structure.

Object Model

DragDropPointBehavior Class

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Provides attached control with drag drop capability. The attached object must be the inner element / part of a complex structure.")>
Public Class DragDropPointBehavior 
   Inherits Intersoft.Client.Framework.ISBehavior(Of UIElement)
Visual Basic (Usage)Copy Code
Dim instance As DragDropPointBehavior
C# 
[DescriptionAttribute("Provides attached control with drag drop capability. The attached object must be the inner element / part of a complex structure.")]
public class DragDropPointBehavior : Intersoft.Client.Framework.ISBehavior<UIElement> 
Delphi 
public class DragDropPointBehavior = class(Intersoft.Client.Framework.ISBehavior)
JScript 
DescriptionAttribute("Provides attached control with drag drop capability. The attached object must be the inner element / part of a complex structure.")
public class DragDropPointBehavior extends Intersoft.Client.Framework.ISBehavior
Managed Extensions for C++ 
[DescriptionAttribute("Provides attached control with drag drop capability. The attached object must be the inner element / part of a complex structure.")]
public __gc class DragDropPointBehavior : public Intersoft.Client.Framework.ISBehavior<UIElement> 
C++/CLI 
[DescriptionAttribute("Provides attached control with drag drop capability. The attached object must be the inner element / part of a complex structure.")]
public ref class DragDropPointBehavior : public Intersoft.Client.Framework.ISBehavior<UIElement> 

Remarks

DragDropPointBehavior is part of ClientUI drag-drop framework library, to learn more about ClientUI Drag-drop Library see Drag-drop Framework Overview.

To make an UIElement dragable, simply attach a DragDropBehavior to that particular elements as shown in the XAML code below.

XAML Copy Code
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
    <i:Interaction.Behaviors>
        <Intersoft:DragDropBehavior/>
    </i:Interaction.Behaviors>
    <Image Source="folder.png" Height="64" Width="64"/>
    <TextBlock Text="My Archive" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>

In the above sample, the DragDropBehavior is attached to a StackPanel that has an image and a text element.

The side effect of this concept is that you can start the drag-drop operation by dragging any elements within the StackPanel, which might not always be desirable. To make only certain elements dragable, you attach a DragDropPointBehavior to the desired dragable element which is the children element of the StackPanel.

The following code shows how you can limit the drag source to an Image element.

XAML Copy Code
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
    <i:Interaction.Behaviors>
        <Intersoft:DragDropBehavior IsDragable="False"/>
    </i:Interaction.Behaviors>
    <Image Source="folder.png" Height="64" Width="64">
        <i:Interaction.Behaviors>
            <Intersoft:DragDropPointBehavior IsDragable="True"/>
        </i:Interaction.Behaviors>
    </Image>
    <TextBlock Text="My Archive" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>

 

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      System.Windows.Interactivity.Behavior
         System.Windows.Interactivity.Behavior<T>
            Intersoft.Client.Framework.ISBehavior<T>
               Intersoft.Client.UI.Controls.Interactivity.DragDropPointBehavior

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.