# OpenFilePickerBehaviorBase

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

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

```rust
struct OpenFilePickerBehaviorBase
```

Open file picker behavior base: a behavior that opens a file picker dialog when the deriving
class calls `execute`.

The picked files (`Vec<StorageFileRef>`) are given to the handlers of `pick` and,
unless a handler handled them, to the command.

The class is abstract.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/storage_provider/open_file_picker_behavior_base.rs#L25)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_pick`](#function-on_pick)
- [`allow_multiple_property`](#function-allow_multiple_property)
- [`file_type_filter_property`](#function-file_type_filter_property)
- [`construct`](#function-construct)
- [`pick`](#function-pick)
- [`allow_multiple`](#function-allow_multiple)
- [`set_allow_multiple`](#function-set_allow_multiple)
- [`file_type_filter`](#function-file_type_filter)
- [`set_file_type_filter`](#function-set_file_type_filter)
- [`execute`](#function-execute)

<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/storage_provider/open_file_picker_behavior_base.rs#L30)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/storage_provider/open_file_picker_behavior_base.rs#L30)

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

### on_pick

```rust
fn on_pick(self: &Self, args: &FilePickerEventArgs)
```

Raises the `pick` event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/storage_provider/open_file_picker_behavior_base.rs#L30)

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

### allow_multiple_property

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

Identifies the `AllowMultiple` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/storage_provider/open_file_picker_behavior_base.rs#L38)

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

### file_type_filter_property

```rust
fn file_type_filter_property() -> &'static StyledProperty<Option<String>>
```

Identifies the `FileTypeFilter` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/storage_provider/open_file_picker_behavior_base.rs#L38)

<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/storage_provider/open_file_picker_behavior_base.rs#L72)

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

### pick

```rust
fn pick(self: &Self, handler: impl Fn(&FilePickerEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
```

Occurs after the file picker successfully returns one or more files. Disposing the returned
handle removes the handler.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/storage_provider/open_file_picker_behavior_base.rs#L78)

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

### allow_multiple

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

Gets or sets an option indicating whether the open picker allows users to select multiple
files. This is a property of the object model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/storage_provider/open_file_picker_behavior_base.rs#L90)

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

### set_allow_multiple

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/storage_provider/open_file_picker_behavior_base.rs#L94)

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

### file_type_filter

```rust
fn file_type_filter(self: &Self) -> Option<String>
```

Gets or sets the file types that the file open picker displays, as a filter
(`Description|*.ext;*.other|..`). This is a property of the object model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/storage_provider/open_file_picker_behavior_base.rs#L100)

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

### set_file_type_filter

```rust
fn set_file_type_filter(self: &Self, value: Option<String>)
```



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

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

### execute

```rust
async fn execute(self: &Self, sender: Option<&BoxedValue>, _parameter: Option<&BoxedValue>)
```

Executes the open file picker using the provided sender and command parameter: does
nothing when the sender is not a visual.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/storage_provider/open_file_picker_behavior_base.rs#L110)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`OpenFilePickerBehaviorBaseImplExt`](/docs/0.5.0/api/ferroui-xaml-interactions/trait-openfilepickerbehaviorbaseimplext/)
- `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<OpenFilePickerBehaviorBase>`](/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/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`StyledElementBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`OpenFilePickerBehaviorBaseImpl`](/docs/0.5.0/api/ferroui-xaml-interactions/trait-openfilepickerbehaviorbaseimpl/)

## Availability

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