# GridDragBehavior

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

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

```rust
struct GridDragBehavior
```

Allows dragging of grid child controls with optional layout copying: the associated control
swaps its column, row and spans (as the `copy_*` properties select) with the child of the
`Grid` (or the container of the `ItemsControl`) the pointer is over.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L23)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`copy_column_property`](#function-copy_column_property)
- [`copy_row_property`](#function-copy_row_property)
- [`copy_column_span_property`](#function-copy_column_span_property)
- [`copy_row_span_property`](#function-copy_row_span_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`copy_column`](#function-copy_column)
- [`set_copy_column`](#function-set_copy_column)
- [`copy_row`](#function-copy_row)
- [`set_copy_row`](#function-set_copy_row)
- [`copy_column_span`](#function-copy_column_span)
- [`set_copy_column_span`](#function-set_copy_column_span)
- [`copy_row_span`](#function-copy_row_span)
- [`set_copy_row_span`](#function-set_copy_row_span)

<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.Draggable/grid_drag_behavior.rs#L33)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L33)

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

### copy_column_property

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

Identifies the `CopyColumn` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L37)

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

### copy_row_property

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

Identifies the `CopyRow` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L37)

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

### copy_column_span_property

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

Identifies the `CopyColumnSpan` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L37)

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

### copy_row_span_property

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

Identifies the `CopyRowSpan` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L37)

<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.Draggable/grid_drag_behavior.rs#L146)

<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.Draggable/grid_drag_behavior.rs#L159)

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

### copy_column

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

Gets or sets whether to copy the dragged element's column.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L164)

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

### set_copy_column

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L168)

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

### copy_row

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

Gets or sets whether to copy the dragged element's row.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L173)

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

### set_copy_row

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L177)

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

### copy_column_span

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

Gets or sets whether to copy the dragged element's column span.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L182)

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

### set_copy_column_span

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L186)

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

### copy_row_span

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

Gets or sets whether to copy the dragged element's row span.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L191)

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

### set_copy_row_span

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Draggable/grid_drag_behavior.rs#L195)

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