# ContextDropBehaviorBase

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

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

```rust
struct ContextDropBehaviorBase
```

Behavior base class that enables dropping context data onto the associated control: the drag
events of the control go to the members of [`ContextDropBehaviorBaseImpl`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/trait-contextdropbehaviorbaseimpl/), with the context of
the drag source (found by its key in the drag data) and the `context` of the
target, or else the data context of the control.

The class is abstract.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_enter`](#function-on_enter)
- [`on_leave`](#function-on_leave)
- [`on_over`](#function-on_over)
- [`on_drop`](#function-on_drop)
- [`context_property`](#function-context_property)
- [`construct`](#function-construct)
- [`context_data_transfer_format`](#function-context_data_transfer_format)
- [`context`](#function-context)
- [`set_context`](#function-set_context)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

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

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<ContextDropBehaviorBase>
```

Returns a strong reference to this object.

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

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

### on_enter

```rust
fn on_enter(self: &Self, sender: Option<&BoxedValue>, e: &DragEventArgs, source_context: Option<&BoxedValue>, target_context: Option<&BoxedValue>)
```

Called when a drag enters the target.

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

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

### on_leave

```rust
fn on_leave(self: &Self, sender: Option<&BoxedValue>, e: &RoutedEventArgs)
```

Called when the drag leaves the target.

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

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

### on_over

```rust
fn on_over(self: &Self, sender: Option<&BoxedValue>, e: &DragEventArgs, source_context: Option<&BoxedValue>, target_context: Option<&BoxedValue>)
```

Called repeatedly as the drag moves over the target.

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

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

### on_drop

```rust
fn on_drop(self: &Self, sender: Option<&BoxedValue>, e: &DragEventArgs, source_context: Option<&BoxedValue>, target_context: Option<&BoxedValue>)
```

Called when the drag is dropped on the target.

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

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

### context_property

```rust
fn context_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Identifies the `Context` property.

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

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

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

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

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

### context_data_transfer_format

```rust
fn context_data_transfer_format() -> DataFormatOf<String>
```

Identifies the application data format used to store context identifiers.

Deviation (DEVIATIONS.md, Behaviors): the identifier of the format names the namespace of
the port.

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

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

### context

```rust
fn context(self: &Self) -> Option<BoxedValue>
```

Gets or sets context data provided to the drop handler.

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

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

### set_context

```rust
fn set_context(self: &Self, value: Option<BoxedValue>)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ContextDropBehaviorBaseImplExt`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/trait-contextdropbehaviorbaseimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`StyledElementBehaviorImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<ContextDropBehaviorBase>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`ContextDropBehaviorBaseImpl`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/trait-contextdropbehaviorbaseimpl/)
- [`StyledElementBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimpl/)

## Availability

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