# DragDropCommandsBehavior

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

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

```rust
struct DragDropCommandsBehavior
```

Behavior that exposes commands for drag-and-drop events: each drag event executes its command
with the event args (or no parameter), and the `can_execute_*` properties tell whether each
command can execute.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`drag_enter_command_property`](#function-drag_enter_command_property)
- [`drag_over_command_property`](#function-drag_over_command_property)
- [`drag_leave_command_property`](#function-drag_leave_command_property)
- [`drop_command_property`](#function-drop_command_property)
- [`can_execute_command_parameter_property`](#function-can_execute_command_parameter_property)
- [`can_execute_drag_enter_command_property`](#function-can_execute_drag_enter_command_property)
- [`can_execute_drag_over_command_property`](#function-can_execute_drag_over_command_property)
- [`can_execute_drag_leave_command_property`](#function-can_execute_drag_leave_command_property)
- [`can_execute_drop_command_property`](#function-can_execute_drop_command_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`drag_enter_command`](#function-drag_enter_command)
- [`set_drag_enter_command`](#function-set_drag_enter_command)
- [`drag_over_command`](#function-drag_over_command)
- [`set_drag_over_command`](#function-set_drag_over_command)
- [`drag_leave_command`](#function-drag_leave_command)
- [`set_drag_leave_command`](#function-set_drag_leave_command)
- [`drop_command`](#function-drop_command)
- [`set_drop_command`](#function-set_drop_command)
- [`can_execute_command_parameter`](#function-can_execute_command_parameter)
- [`set_can_execute_command_parameter`](#function-set_can_execute_command_parameter)
- [`can_execute_drag_enter_command`](#function-can_execute_drag_enter_command)
- [`can_execute_drag_over_command`](#function-can_execute_drag_over_command)
- [`can_execute_drag_leave_command`](#function-can_execute_drag_leave_command)
- [`can_execute_drop_command`](#function-can_execute_drop_command)
- [`pass_event_args_to_command`](#function-pass_event_args_to_command)
- [`set_pass_event_args_to_command`](#function-set_pass_event_args_to_command)

<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/drag_drop_commands_behavior.rs#L31)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### drag_enter_command_property

```rust
fn drag_enter_command_property() -> &'static StyledProperty<Option<Rc<dyn ICommand>>>
```

Identifies the `DragEnterCommand` property.

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

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

### drag_over_command_property

```rust
fn drag_over_command_property() -> &'static StyledProperty<Option<Rc<dyn ICommand>>>
```

Identifies the `DragOverCommand` property.

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

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

### drag_leave_command_property

```rust
fn drag_leave_command_property() -> &'static StyledProperty<Option<Rc<dyn ICommand>>>
```

Identifies the `DragLeaveCommand` property.

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

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

### drop_command_property

```rust
fn drop_command_property() -> &'static StyledProperty<Option<Rc<dyn ICommand>>>
```

Identifies the `DropCommand` property.

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

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

### can_execute_command_parameter_property

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

Identifies the `CanExecuteCommandParameter` property.

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

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

### can_execute_drag_enter_command_property

```rust
fn can_execute_drag_enter_command_property() -> &'static DirectProperty<DragDropCommandsBehavior, bool>
```

Identifies the `CanExecuteDragEnterCommand` property.

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

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

### can_execute_drag_over_command_property

```rust
fn can_execute_drag_over_command_property() -> &'static DirectProperty<DragDropCommandsBehavior, bool>
```

Identifies the `CanExecuteDragOverCommand` property.

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

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

### can_execute_drag_leave_command_property

```rust
fn can_execute_drag_leave_command_property() -> &'static DirectProperty<DragDropCommandsBehavior, bool>
```

Identifies the `CanExecuteDragLeaveCommand` property.

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

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

### can_execute_drop_command_property

```rust
fn can_execute_drop_command_property() -> &'static DirectProperty<DragDropCommandsBehavior, bool>
```

Identifies the `CanExecuteDropCommand` property.

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

<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/drag_drop_commands_behavior.rs#L227)

<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/drag_drop_commands_behavior.rs#L243)

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

### drag_enter_command

```rust
fn drag_enter_command(self: &Self) -> Option<Rc<dyn ICommand>>
```

Gets or sets the command invoked on drag enter.

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

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

### set_drag_enter_command

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



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

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

### drag_over_command

```rust
fn drag_over_command(self: &Self) -> Option<Rc<dyn ICommand>>
```

Gets or sets the command invoked on drag over.

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

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

### set_drag_over_command

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



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

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

### drag_leave_command

```rust
fn drag_leave_command(self: &Self) -> Option<Rc<dyn ICommand>>
```

Gets or sets the command invoked on drag leave.

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

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

### set_drag_leave_command

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



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

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

### drop_command

```rust
fn drop_command(self: &Self) -> Option<Rc<dyn ICommand>>
```

Gets or sets the command invoked on drop.

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

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

### set_drop_command

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



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

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

### can_execute_command_parameter

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

Gets or sets the parameter used to evaluate the drag-and-drop commands before
event-specific parameters are available. This property does not change the parameter
passed to command execution.

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

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

### set_can_execute_command_parameter

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



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

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

### can_execute_drag_enter_command

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

Gets a value indicating whether `drag_enter_command` can execute
with the current can-execute parameter.

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

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

### can_execute_drag_over_command

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

Gets a value indicating whether `drag_over_command` can execute
with the current can-execute parameter.

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

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

### can_execute_drag_leave_command

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

Gets a value indicating whether `drag_leave_command` can execute
with the current can-execute parameter.

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

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

### can_execute_drop_command

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

Gets a value indicating whether `drop_command` can execute with the
current can-execute parameter.

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

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

### pass_event_args_to_command

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

Specifies whether the event args should be passed to the command.

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

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

### set_pass_event_args_to_command

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



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`DragAndDropEventsBehaviorImplExt`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/trait-draganddropeventsbehaviorimplext/)
- `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<DragDropCommandsBehavior>`](/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/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimpl/)
- [`DragAndDropEventsBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactions-draganddrop/trait-draganddropeventsbehaviorimpl/)

## Availability

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