# AddPreviewFilesAction

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

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

```rust
struct AddPreviewFilesAction
```

Adds the files of a drag event (the parameter of the action) to the items of an
`ItemsControl`: the `items_control`, or else the sender.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`items_control_property`](#function-items_control_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`items_control`](#function-items_control)
- [`set_items_control`](#function-set_items_control)

<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/add_preview_files_action.rs#L24)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### items_control_property

```rust
fn items_control_property() -> &'static StyledProperty<Option<ElementRef<ItemsControl>>>
```

Identifies the `ItemsControl` property.

Deviation (DEVIATIONS.md, Behaviors): the items control is held by an element reference
(a weak reference), as the framework holds the elements a property names.

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

<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/add_preview_files_action.rs#L94)

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

### new

```rust
fn new() -> Ref<Self>
```

Creates the action.

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

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

### items_control

```rust
fn items_control(self: &Self) -> Option<Ref<ItemsControl>>
```

Gets or sets the items control used to display preview.

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

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

### set_items_control

```rust
fn set_items_control(self: &Self, value: Option<Ref<ItemsControl>>)
```



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

## 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`
- [`StyledElementActionImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementactionimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<AddPreviewFilesAction>`](/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/)
- [`StyledElementActionImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementactionimpl/)

## Availability

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