# IDragHandler

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/trait-idraghandler/

**trait** · [`ferroui-xaml-interactions-draganddrop`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/) · v0.5.0

```rust
trait IDragHandler
```

Provides callbacks for drag operations.

`sender` is the element the drag starts from (an untyped value holding the object), `e` the
pointer event that started the drag and `context` the data dragged.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.DragAndDrop/contract/i_drag_handler.rs#L10)

## Members

- [`before_drag_drop`](#function-before_drag_drop)
- [`after_drag_drop`](#function-after_drag_drop)

<a id="function-before_drag_drop"></a>

### before_drag_drop

```rust
fn before_drag_drop(self: &Self, sender: Option<&BoxedValue>, e: &PointerEventArgs, context: Option<&BoxedValue>)
```

Called before the drag operation begins.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.DragAndDrop/contract/i_drag_handler.rs#L12)

<a id="function-after_drag_drop"></a>

### after_drag_drop

```rust
fn after_drag_drop(self: &Self, sender: Option<&BoxedValue>, e: &PointerEventArgs, context: Option<&BoxedValue>)
```

Called after the drag operation completes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.DragAndDrop/contract/i_drag_handler.rs#L15)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
