# ManagedContextDropBehavior

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

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

```rust
struct ManagedContextDropBehavior
```

Drop target behavior that integrates with [`ManagedDragDropService`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/struct-manageddragdropservice/).

It mirrors the semantics of `ContextDropBehavior` but works
entirely in-process: while a managed drag of the `accept_data_format`
is in progress the target gets the pseudo class `droptarget` when its handler validates the
payload, and `dragover` (and the `over_class`) while the pointer is over it.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`accept_data_format_property`](#function-accept_data_format_property)
- [`allow_drop_property`](#function-allow_drop_property)
- [`over_class_property`](#function-over_class_property)
- [`context_property`](#function-context_property)
- [`handler_property`](#function-handler_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`accept_data_format`](#function-accept_data_format)
- [`set_accept_data_format`](#function-set_accept_data_format)
- [`allow_drop`](#function-allow_drop)
- [`set_allow_drop`](#function-set_allow_drop)
- [`over_class`](#function-over_class)
- [`set_over_class`](#function-set_over_class)
- [`context`](#function-context)
- [`set_context`](#function-set_context)
- [`handler`](#function-handler)
- [`set_handler`](#function-set_handler)

<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/managed_drag_drop/managed_context_drop_behavior.rs#L53)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### accept_data_format_property

```rust
fn accept_data_format_property() -> &'static StyledProperty<String>
```

Identifies the `AcceptDataFormat` property.

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

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

### allow_drop_property

```rust
fn allow_drop_property() -> &'static StyledProperty<bool>
```

Identifies the `AllowDrop` property.

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

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

### over_class_property

```rust
fn over_class_property() -> &'static StyledProperty<Option<String>>
```

Identifies the `OverClass` property.

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

<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/managed_drag_drop/managed_context_drop_behavior.rs#L64)

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

### handler_property

```rust
fn handler_property() -> &'static StyledProperty<Option<Rc<dyn IDropHandler>>>
```

Identifies the `Handler` property.

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

<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/managed_drag_drop/managed_context_drop_behavior.rs#L134)

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

### new

```rust
fn new() -> Ref<Self>
```

Creates the behavior.

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

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

### accept_data_format

```rust
fn accept_data_format(self: &Self) -> String
```

Gets or sets the accepted managed data format.

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

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

### set_accept_data_format

```rust
fn set_accept_data_format(self: &Self, value: String)
```



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

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

### allow_drop

```rust
fn allow_drop(self: &Self) -> bool
```

Gets or sets a value indicating whether drop is allowed.

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

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

### set_allow_drop

```rust
fn set_allow_drop(self: &Self, value: bool)
```



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

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

### over_class

```rust
fn over_class(self: &Self) -> Option<String>
```

Gets or sets an optional class applied while the pointer is over the target during drag.

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

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

### set_over_class

```rust
fn set_over_class(self: &Self, value: Option<String>)
```



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

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

### context

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

Gets or sets the context value supplied to the drop handler.

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

<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/managed_drag_drop/managed_context_drop_behavior.rs#L180)

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

### handler

```rust
fn handler(self: &Self) -> Option<Rc<dyn IDropHandler>>
```

Gets or sets the handler that receives managed drag-drop notifications.

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

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

### set_handler

```rust
fn set_handler(self: &Self, value: Option<Rc<dyn IDropHandler>>)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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<ManagedContextDropBehavior>`](/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/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`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/).
