| Visual Basic (Declaration) | |
|---|---|
Public Event DragEnter As DragEventHandler  | |
| Visual Basic (Usage) |  Copy Code | 
|---|---|
Dim instance As DropTargetBehavior Dim handler As DragEventHandler AddHandler instance.DragEnter, handler  | |
| C# | |
|---|---|
public event DragEventHandler DragEnter  | |
| Delphi | |
|---|---|
public event DragEnter: DragEventHandler;  | |
| JScript | |
|---|---|
In JScript, you can handle the events defined by another class, but you cannot define your own.  | |
| Managed Extensions for C++ | |
|---|---|
public: __event DragEventHandler* DragEnter  | |
| C++/CLI | |
|---|---|
public: event DragEventHandler^ DragEnter  | |
The event handler receives an argument of type DragEventArgs containing data related to this event. The following DragEventArgs properties provide information specific to this event.
| Property | Description | 
|---|---|
| AllowedEffects | Gets allowed effects. | 
| Data | Gets data carried. | 
| Effects | Gets current drag effects. | 
| Handled (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | |
| HandledBy (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | |
| IsHandledByPrimitive (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | |
| KeyStates | Gets current key states. | 
| OriginalSource (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | |
| RoutedEvent (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | |
| Source (Inherited from Intersoft.Client.Framework.ISRoutedEventArgs) | 
The following code shows how to change the tooltip at DragEnter event.
![]()  | 
                All drag-drop events are built on routed event architecture including the DragEnterEvent. To learn more about routed event, see Routed Events overview. | 
| XAML |  Copy Code | 
            
|---|---|
                    <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top"> <i:Interaction.Behaviors> <Intersoft:DragDropBehavior IsDragable="False" TooltipIcon="NotAllowed.png" TooltipText="Not Allowed"/> </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> <Image Source="RecycleBin.png" HorizontalAlignment="Center" Height="100" VerticalAlignment="Center" Width="100" AllowDrop=True> </Image>  | 
            |
| 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.DragEnterEvent, // the routed event new Intersoft.Client.UI.Controls.Interactivity.DragEventHandler(DropTarget_DragEnter), // the event handler true); } private void DropTarget_DragEnter(object sender, Intersoft.Client.UI.Controls.Interactivity.DragEventArgs e) { e.SetCustomTooltip(new BitmapImage(new Uri("Remove.png", UriKind.RelativeOrAbsolute))); e.SetCustomTooltip("Remove to recycle bin."); }  | 
            |
This event raised when an object is entering the drop target.
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
    
    
    
    
    
    
                
Copy Code