Intersoft.Client.UI.Controls.Interactivity Namespace > DragDropBehavior Class : IsDragable Property |
<CategoryAttribute("Behavior")> Public Property IsDragable As Boolean
Dim instance As DragDropBehavior Dim value As Boolean instance.IsDragable = value value = instance.IsDragable
[CategoryAttribute("Behavior")] public bool IsDragable {get; set;}
[CategoryAttribute("Behavior")] public: property bool IsDragable { bool get(); void set ( bool value); }
This property determines whether the element attached with DragDropBehavior is dragable. When this property is set to False, the element will become un-dragable. However you can use DragDropPointBehavior to enable drag on specific element.
The following code shows how you can limit the drag source to an Image element using DragDropPointBehavior.
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> |
Notice that IsDragable property is used to disable and enable drag source on specific element.
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