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






Identifies the DragLeave routed event.

Syntax

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

Example

The following code shows how to change the tooltip at DragLeave event. 

All drag-drop events are built on routed event architecture including the DragLeaveEvent. To learn more about routed event, see Routed Events overview.
XAML Copy Code
<Intersoft:UXStackPanel HorizontalAlignment="Center" VerticalAlignment="Top" DragMode="Move" AllowMoveItem="True" AllowDropItem="True">
    <StackPanel>
        <Image Source="folder.png" Height="64" Width="64"/>
        <TextBlock Text="My Archive" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    </StackPanel>
    <StackPanel>
        <Image Source="folder.png" Height="64" Width="64"/>
        <TextBlock Text="My Photos" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    </StackPanel>
    <StackPanel>
        <Image Source="folder.png" Height="64" Width="64"/>
        <TextBlock Text="My Videos" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    </StackPanel>
C# Copy Code
public MainPage()
{
    // Required to initialize variables
    InitializeComponent();

    ISEventManager.RegisterInstanceHandler(
        this.LayoutRoot, // any element in the routed path which applicable in your scenario
        DragDrop.DragLeaveEvent, // the routed event
        new Intersoft.Client.UI.Controls.Interactivity.DragEventHandler(DropTarget_DragLeave), // the event handler
        true);
}

private void DropTarget_DragLeave(object sender, Intersoft.Client.UI.Controls.Interactivity.DragEventArgs e)
{
    e.SetCustomTooltip("Can not drop to this area.");            
}

Remarks

This is a bubbling event raised when leaving drop target. To learn about the drag drop events sequence see Drag-drop Framework Overview.

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.