Skip to main content

FilePickerSaveOptions Class

Definition

Assembly:Avalonia.Base
Package:Avalonia
public class FilePickerSaveOptions

Inheritance: object -> PickerOptions -> FilePickerSaveOptions

Constructors

NameDescription
FilePickerSaveOptionsNo summary available.

FilePickerSaveOptions Constructor

public FilePickerSaveOptions()

Properties

NameDescription
DefaultExtensionGets or sets the default extension to be used to save the file.
FileTypeChoicesGets or sets the collection of valid file types that the user can choose to assign to a file.
ShowOverwritePromptGets or sets a value indicating whether file open picker displays a warning if the user specifies the name of a file that already exists.
SuggestedFileTypeGets or sets the file type that should be preselected when the dialog is opened.
SuggestedFileNameGets or sets the file name that the file picker suggests to the user. Inherited from PickerOptions.
SuggestedStartLocationGets or sets the initial location where the file open picker looks for files to present to the user. Can be obtained from previously picked folder or using Avalonia.Platform.Storage.IStorageProvider.TryGetFolderFromPathAsync(Uri) or Avalonia.Platform.Storage.IStorageProvider.TryGetWellKnownFolderAsync(Avalonia.Platform.Storage.WellKnownFolder). Inherited from PickerOptions.
TitleGets or sets the text that appears in the title bar of a picker. Inherited from PickerOptions.

DefaultExtension Property

Gets or sets the default extension to be used to save the file.

public string DefaultExtension { get; set; }

FileTypeChoices Property

Gets or sets the collection of valid file types that the user can choose to assign to a file.

public System.Collections.Generic.IReadOnlyList<Avalonia.Platform.Storage.FilePickerFileType> FileTypeChoices { get; set; }

ShowOverwritePrompt Property

Gets or sets a value indicating whether file open picker displays a warning if the user specifies the name of a file that already exists.

public Nullable<bool> ShowOverwritePrompt { get; set; }

SuggestedFileType Property

Gets or sets the file type that should be preselected when the dialog is opened.

public Avalonia.Platform.Storage.FilePickerFileType SuggestedFileType { get; set; }

Remarks

This value should reference one of the items in Avalonia.Platform.Storage.FilePickerSaveOptions.FileTypeChoices. If not set, the first file type in Avalonia.Platform.Storage.FilePickerSaveOptions.FileTypeChoices may be selected by default.