# PickerActionBase

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

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

```rust
struct PickerActionBase
```

Base class for picker actions: the storage provider, the title and the suggested start location
of the picker, and the tracking of the picker operations that run.

The class is abstract: a deriving class implements `StyledElementActionImpl::execute`.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`storage_provider_property`](#function-storage_provider_property)
- [`title_property`](#function-title_property)
- [`suggested_start_location_property`](#function-suggested_start_location_property)
- [`suggested_start_location_path_property`](#function-suggested_start_location_path_property)
- [`suggested_file_name_property`](#function-suggested_file_name_property)
- [`create_suggested_start_location_directory_property`](#function-create_suggested_start_location_directory_property)
- [`construct`](#function-construct)
- [`storage_provider`](#function-storage_provider)
- [`set_storage_provider`](#function-set_storage_provider)
- [`title`](#function-title)
- [`set_title`](#function-set_title)
- [`suggested_start_location`](#function-suggested_start_location)
- [`set_suggested_start_location`](#function-set_suggested_start_location)
- [`suggested_start_location_path`](#function-suggested_start_location_path)
- [`set_suggested_start_location_path`](#function-set_suggested_start_location_path)
- [`suggested_file_name`](#function-suggested_file_name)
- [`set_suggested_file_name`](#function-set_suggested_file_name)
- [`create_suggested_start_location_directory`](#function-create_suggested_start_location_directory)
- [`set_create_suggested_start_location_directory`](#function-set_create_suggested_start_location_directory)
- [`resolve_storage_provider`](#function-resolve_storage_provider)
- [`resolve_suggested_start_location`](#function-resolve_suggested_start_location)
- [`track_picker_operation`](#function-track_picker_operation)
- [`track_dispatched_picker_operation`](#function-track_dispatched_picker_operation)

<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/core/picker_action_base.rs#L27)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### storage_provider_property

```rust
fn storage_provider_property() -> &'static StyledProperty<Option<StorageProviderRef>>
```

Identifies the `StorageProvider` property.

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

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

### title_property

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

Identifies the `Title` property.

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

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

### suggested_start_location_property

```rust
fn suggested_start_location_property() -> &'static StyledProperty<Option<StorageFolderRef>>
```

Identifies the `SuggestedStartLocation` property.

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

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

### suggested_start_location_path_property

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

Identifies the `SuggestedStartLocationPath` property.

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

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

### suggested_file_name_property

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

Identifies the `SuggestedFileName` property.

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

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

### create_suggested_start_location_directory_property

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

Identifies the `CreateSuggestedStartLocationDirectory` property.

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

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

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

### storage_provider

```rust
fn storage_provider(self: &Self) -> Option<StorageProviderRef>
```

Gets or sets the storage provider that the picker uses to access the file system. This is a
property of the object model.

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

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

### set_storage_provider

```rust
fn set_storage_provider(self: &Self, value: Option<StorageProviderRef>)
```



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

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

### title

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

Gets or sets the text that appears in the title bar of a picker. This is a property of the
object model.

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

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

### set_title

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



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

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

### suggested_start_location

```rust
fn suggested_start_location(self: &Self) -> Option<StorageFolderRef>
```

Gets or sets the initial location where the picker looks for files to present to the user.
This is a property of the object model.

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

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

### set_suggested_start_location

```rust
fn set_suggested_start_location(self: &Self, value: Option<StorageFolderRef>)
```



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

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

### suggested_start_location_path

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

Gets or sets a fallback path that is used to resolve the suggested start location when no
folder is provided.

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

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

### set_suggested_start_location_path

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



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

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

### suggested_file_name

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

Gets or sets the file name that the file picker suggests to the user. This is a property of
the object model.

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

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

### set_suggested_file_name

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



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

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

### create_suggested_start_location_directory

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

Gets or sets a value indicating whether to create the suggested start location directory if
it doesn't exist. This is a property of the object model.

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

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

### set_create_suggested_start_location_directory

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



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

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

### resolve_storage_provider

```rust
fn resolve_storage_provider(self: &Self, fallback_visual: Option<&Visual>) -> Option<Rc<dyn IStorageProvider>>
```

Resolves the storage provider using the configured value or the provided fallback visual
(then the action itself).

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

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

### resolve_suggested_start_location

```rust
async fn resolve_suggested_start_location(self: &Self, provider: Option<Rc<dyn IStorageProvider>>) -> Option<Rc<dyn IStorageFolder>>
```

Resolves the suggested start folder using the configured value or the configured path,
translated by `provider`.

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

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

### track_picker_operation

```rust
fn track_picker_operation(self: &Self, operation: ActionTask) -> ActionTask
```

Keeps an asynchronous picker operation rooted until it completes, and returns it.

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

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

### track_dispatched_picker_operation

```rust
fn track_dispatched_picker_operation<F, Fut>(self: &Self, operation: F) -> ActionTask
where F: FnOnce() -> Fut + 'static,
      Fut: Future<Output = ()> + 'static
```

Runs and tracks an asynchronous picker operation on the dispatcher of the user interface.

Deviation (DEVIATIONS.md, Behaviors): the reference accepts the call from any thread; the
operation of the port uses the objects of the user interface, which belong to its thread,
so the call is made on that thread (the operation still runs in a job of its dispatcher).

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

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