# SaveFilePickerAction

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

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

```rust
struct SaveFilePickerAction
```

An action that will open a save file picker dialog.

The picked file (`StorageFileRef`) is given to the handlers of `pick` and,
unless a handler handled it, to the command.

Deviation (DEVIATIONS.md, Behaviors): the `Pick` event is an event of the Rust API (a handler
list), not declared to markup.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_pick`](#function-on_pick)
- [`default_extension_property`](#function-default_extension_property)
- [`file_type_choices_property`](#function-file_type_choices_property)
- [`show_overwrite_prompt_property`](#function-show_overwrite_prompt_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`pick`](#function-pick)
- [`default_extension`](#function-default_extension)
- [`set_default_extension`](#function-set_default_extension)
- [`file_type_choices`](#function-file_type_choices)
- [`set_file_type_choices`](#function-set_file_type_choices)
- [`show_overwrite_prompt`](#function-show_overwrite_prompt)
- [`set_show_overwrite_prompt`](#function-set_show_overwrite_prompt)

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

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

### to_ref

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

Returns a strong reference to this object.

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

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

### on_pick

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

Raises the `pick` event.

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

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

### default_extension_property

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

Identifies the `DefaultExtension` property.

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

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

### file_type_choices_property

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

Identifies the `FileTypeChoices` property.

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

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

### show_overwrite_prompt_property

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

Identifies the `ShowOverwritePrompt` property.

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

<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/save_file_picker_action.rs#L95)

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

### new

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

Creates an action.

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

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

### pick

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

Occurs after the save file picker successfully returns a file. Disposing the returned
handle removes the handler.

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

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

### default_extension

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

Gets or sets the default extension to be used to save the file. This is a property of the
object model.

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

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

### set_default_extension

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



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

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

### file_type_choices

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

Gets or sets the file types that the user can choose to assign to a file, 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/save_file_picker_action.rs#L128)

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

### set_file_type_choices

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



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

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

### show_overwrite_prompt

```rust
fn show_overwrite_prompt(self: &Self) -> Option<bool>
```

Gets or sets a value indicating whether the picker displays a warning if the user specifies
the name of a file that already exists. This is a property of the object model.

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

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

### set_show_overwrite_prompt

```rust
fn set_show_overwrite_prompt(self: &Self, value: Option<bool>)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`SaveFilePickerActionImplExt`](/docs/0.5.0/api/ferroui-xaml-interactions/trait-savefilepickeractionimplext/)
- `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<SaveFilePickerAction>`](/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/)
- [`StyledElementActionImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementactionimpl/)
- [`SaveFilePickerActionImpl`](/docs/0.5.0/api/ferroui-xaml-interactions/trait-savefilepickeractionimpl/)

## Availability

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