# ContextDragWithDirectionBehavior

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

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

```rust
struct ContextDragWithDirectionBehavior
```

Behavior that starts drag and drop with information about drag direction: the drag data holds
`"up"` or `"down"`, as the pointer moved up or down to start the drag.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`context_property`](#function-context_property)
- [`handler_property`](#function-handler_property)
- [`horizontal_drag_threshold_property`](#function-horizontal_drag_threshold_property)
- [`vertical_drag_threshold_property`](#function-vertical_drag_threshold_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`context`](#function-context)
- [`set_context`](#function-set_context)
- [`handler`](#function-handler)
- [`set_handler`](#function-set_handler)
- [`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_with_direction_behavior.rs#L35)

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

### to_ref

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

Returns a strong reference to this object.

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

<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_with_direction_behavior.rs#L39)

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

### handler_property

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

Identifies the `Handler` property.

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

<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_with_direction_behavior.rs#L39)

<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_with_direction_behavior.rs#L39)

<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_with_direction_behavior.rs#L132)

<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/context_drag_with_direction_behavior.rs#L144)

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

### context

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

Gets or sets the context used for drag operations.

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

<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_with_direction_behavior.rs#L161)

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

### handler

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

Gets or sets the drag handler to notify.

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

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

### set_handler

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



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

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

### horizontal_drag_threshold

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

Gets or sets the horizontal drag threshold.

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

<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_with_direction_behavior.rs#L179)

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

### vertical_drag_threshold

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

Gets or sets the vertical drag threshold.

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

<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_with_direction_behavior.rs#L188)

## 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<ContextDragWithDirectionBehavior>`](/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/).
