# TypedDragBehaviorBase

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

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

```rust
struct TypedDragBehaviorBase
```

Behavior base class that initiates a drag operation for a specific data type: the press starts
a drag only over an element whose data context is of the `data_type`.

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

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

## 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)
- [`data_type_property`](#function-data_type_property)
- [`construct`](#function-construct)
- [`data_type`](#function-data_type)
- [`set_data_type`](#function-set_data_type)

<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/typed_drag_behavior_base.rs#L35)

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

### to_ref

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

Returns a strong reference to this object.

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

<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/typed_drag_behavior_base.rs#L35)

<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/typed_drag_behavior_base.rs#L35)

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

### data_type_property

```rust
fn data_type_property() -> &'static StyledProperty<Option<ValueType>>
```

Identifies the `DataType` property.

Deviation (DEVIATIONS.md, Behaviors): the `Type` of the reference is the value type of
the framework (what `{x:Type}` gives in markup): the handle type of a class, the type of
a model object or of a value.

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

<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/typed_drag_behavior_base.rs#L147)

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

### data_type

```rust
fn data_type(self: &Self) -> Option<ValueType>
```

Gets or sets the data type allowed for dragging.

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

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

### set_data_type

```rust
fn set_data_type(self: &Self, value: Option<ValueType>)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TypedDragBehaviorBaseImplExt`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/trait-typeddragbehaviorbaseimplext/)
- `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<TypedDragBehaviorBase>`](/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/)
- [`TypedDragBehaviorBaseImpl`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/trait-typeddragbehaviorbaseimpl/)
- [`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/).
