# DragEventArgs

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

Provides data for the [DragDrop](/api/wisej.web/general/control.md#dragdrop), [DragEnter](/api/wisej.web/general/control.md#dragenter), or [DragOver](/api/wisej.web/general/control.md#dragover) event.

{% tabs %}
{% tab title="C#" %}

```csharp
public class DragEventArgs : EventArgs
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class DragEventArgs
    Inherits EventArgs
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) DragEventArgs(allowedEffect, effect, data, location)

Initializes a new instance of the [DragEventArgs](/api/wisej.web/general/control/wisej.web.drageventargs.md) class.

| Name              | Type                                                                        | Description                                                                                                            |
| ----------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **allowedEffect** | [DragDropEffects](/api/wisej.web/enumerations/wisej.web.dragdropeffects.md) | One of the [DragDropEffects](/api/wisej.web/enumerations/wisej.web.dragdropeffects.md) values.                         |
| **effect**        | [DragDropEffects](/api/wisej.web/enumerations/wisej.web.dragdropeffects.md) | One of the [DragDropEffects](/api/wisej.web/enumerations/wisej.web.dragdropeffects.md) values.                         |
| **data**          | [Object](https://docs.microsoft.com/dotnet/api/system.object)               | The data associated with this event.                                                                                   |
| **location**      | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)         | The [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) that indicates the location of the drag event. |

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) AllowedEffect

[DragDropEffects](/api/wisej.web/enumerations/wisej.web.dragdropeffects.md): Returns which drag-and-drop operations are allowed by the originator (or source) of the drag event.

### ![](/files/hsR4ok3152WyAf8J2C1u) AllowedFileTypes

[String](https://docs.microsoft.com/dotnet/api/system.string): Specify the types of files that the server accepts (that can be submitted through a file upload).

The allowed files string follows the HTML 4.01 and HTML5 specifications. You can configure only one entry in the browser's file dialog. The syntax is "file\_extension|audio/*|video/*|image/\*|media\_type". Look at [IANA Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml) for a complete list of standard media types.

### ![](/files/hsR4ok3152WyAf8J2C1u) Data

[IDataObject](/api/wisej.web/interfaces/wisej.web.idataobject.md): Returns the [IDataObject](/api/wisej.web/interfaces/wisej.web.idataobject.md) that contains the data associated with this event.

### ![](/files/hsR4ok3152WyAf8J2C1u) DragSource

[Control](/api/wisej.web/general/control.md): Returns the component that started the drag operation by calling [DoDragDrop](/api/wisej.web/general/control.md#dodragdrop-data-allowedeffects).<mark style="color:blue;background-color:green;">Since 2.5.32</mark>

### ![](/files/hsR4ok3152WyAf8J2C1u) DropTarget

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns the original target of the drag operation.

### ![](/files/hsR4ok3152WyAf8J2C1u) Effect

[DragDropEffects](/api/wisej.web/enumerations/wisej.web.dragdropeffects.md): Returns or sets the target drop effect in a drag-and-drop operation.

### ![](/files/hsR4ok3152WyAf8J2C1u) Files

[HttpFileCollection](/api/wisej.core/general/wisej.core.httpfilecollection.md): Returns the [HttpFileCollection](/api/wisej.core/general/wisej.core.httpfilecollection.md) containing the files that have been dropped on the target, or null.

### ![](/files/hsR4ok3152WyAf8J2C1u) Image

[Image](https://docs.microsoft.com/dotnet/api/system.drawing.image): Returns or sets the custom image displayed on the client to represent the drag action.

### ![](/files/hsR4ok3152WyAf8J2C1u) ImageSize

[Size](https://docs.microsoft.com/dotnet/api/system.drawing.size): Returns or sets the size in pixels of the custom image displayed on the client to represent the drag action.

### ![](/files/hsR4ok3152WyAf8J2C1u) ImageSource

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the custom image source displayed on the client to represent the drag action.

### ![](/files/hsR4ok3152WyAf8J2C1u) KeyState

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the current state of the SHIFT, CTRL, and ALT keys, as well as the state of the mouse buttons.

### ![](/files/hsR4ok3152WyAf8J2C1u) Location

[Point](https://docs.microsoft.com/dotnet/api/system.drawing.point): Returns the location of the mouse or pointer event, in screen coordinates.

### ![](/files/hsR4ok3152WyAf8J2C1u) Modifiers

[Keys](/api/wisej.web/enumerations/wisej.web.keys.md): Returns a value indicating which of the modifier keys (SHIFT, CTRL, and ALT) is in a pressed state.

### ![](/files/hsR4ok3152WyAf8J2C1u) X

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the x-coordinate of the mouse or pointer, in screen coordinates.

### ![](/files/hsR4ok3152WyAf8J2C1u) Y

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the y-coordinate of the mouse or pointer, in screen coordinates.

## Used By

| Name                                                                             | Description                                                                                                                                                                                                                                                                     |
| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DragEventHandler](/api/wisej.web/general/control/wisej.web.drageventhandler.md) | Represents the method that will handle the [DragDrop](/api/wisej.web/general/control.md#dragdrop), [DragEnter](/api/wisej.web/general/control.md#dragenter), or [DragOver](/api/wisej.web/general/control.md#dragover) event of a [Control](/api/wisej.web/general/control.md). |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/general/control/wisej.web.drageventargs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
