# ContextDragBehaviorBase

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

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

```rust
struct ContextDragBehaviorBase
```

Behavior base class that starts a drag operation using the associated context data: the
`context`, or else the data context of the associated control, travels with
the drag (by its key in the drag data) to the drop behaviors of this crate.

The class is abstract: a deriving class implements the members of
[`ContextDragBehaviorBaseImpl`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/trait-contextdragbehaviorbaseimpl/).

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_before_drag_drop`](#function-on_before_drag_drop)
- [`on_after_drag_drop`](#function-on_after_drag_drop)
- [`context_property`](#function-context_property)
- [`horizontal_drag_threshold_property`](#function-horizontal_drag_threshold_property)
- [`vertical_drag_threshold_property`](#function-vertical_drag_threshold_property)
- [`construct`](#function-construct)
- [`context`](#function-context)
- [`set_context`](#function-set_context)
- [`horizontal_drag_threshold`](#function-horizontal_drag_threshold)
- [`set_horizontal_drag_threshold`](#function-set_horizontal_drag_threshold)
- [`vertical_drag_threshold`](#function-vertical_drag_threshold)
- [`set_vertical_drag_threshold`](#function-set_vertical_drag_threshold)

<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_drag_behavior_base.rs#L38)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### on_before_drag_drop

```rust
fn on_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/context_drag_behavior_base.rs#L38)

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

### on_after_drag_drop

```rust
fn on_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/context_drag_behavior_base.rs#L38)

<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_drag_behavior_base.rs#L69)

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

### horizontal_drag_threshold_property

```rust
fn horizontal_drag_threshold_property() -> &'static StyledProperty<f64>
```

Identifies the `HorizontalDragThreshold` property.

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

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

### vertical_drag_threshold_property

```rust
fn vertical_drag_threshold_property() -> &'static StyledProperty<f64>
```

Identifies the `VerticalDragThreshold` property.

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

<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_drag_behavior_base.rs#L224)

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

### context

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

Gets or sets context data passed to the drag handler.

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

<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_drag_behavior_base.rs#L240)

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

### horizontal_drag_threshold

```rust
fn horizontal_drag_threshold(self: &Self) -> f64
```

Gets or sets the horizontal distance in pixels required to start a drag.

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

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

### set_horizontal_drag_threshold

```rust
fn set_horizontal_drag_threshold(self: &Self, value: f64)
```



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

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

### vertical_drag_threshold

```rust
fn vertical_drag_threshold(self: &Self) -> f64
```

Gets or sets the vertical distance in pixels required to start a drag.

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

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

### set_vertical_drag_threshold

```rust
fn set_vertical_drag_threshold(self: &Self, value: f64)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ContextDragBehaviorBaseImplExt`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/trait-contextdragbehaviorbaseimplext/)
- `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<ContextDragBehaviorBase>`](/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/)
- [`ContextDragBehaviorBaseImpl`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/trait-contextdragbehaviorbaseimpl/)
- [`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/).
