SaveFilePickerBehaviorBase
struct · ferroui-xaml-interactions · v0.5.0
struct SaveFilePickerBehaviorBase
Save file picker behavior base: a behavior that opens a save file picker dialog when the deriving
class calls execute.
The picked file (StorageFileRef) is given to the handlers of pick and,
unless a handler handled it, to the command.
The class is abstract.
Members
TYPEto_refon_pickdefault_extension_propertyfile_type_choices_propertyshow_overwrite_prompt_propertyconstructpickdefault_extensionset_default_extensionfile_type_choicesset_file_type_choicesshow_overwrite_promptset_show_overwrite_promptexecute
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<SaveFilePickerBehaviorBase>
Returns a strong reference to this object.
on_pick
fn on_pick(self: &Self, args: &SaveFilePickerEventArgs)
Raises the pick event.
default_extension_property
fn default_extension_property() -> &'static StyledProperty<Option<String>>
Identifies the DefaultExtension property.
file_type_choices_property
fn file_type_choices_property() -> &'static StyledProperty<Option<String>>
Identifies the FileTypeChoices property.
show_overwrite_prompt_property
fn show_overwrite_prompt_property() -> &'static StyledProperty<Option<bool>>
Identifies the ShowOverwritePrompt property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
pick
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.
default_extension
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.
set_default_extension
fn set_default_extension(self: &Self, value: Option<String>)
file_type_choices
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.
set_file_type_choices
fn set_file_type_choices(self: &Self, value: Option<String>)
show_overwrite_prompt
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.
set_show_overwrite_prompt
fn set_show_overwrite_prompt(self: &Self, value: Option<bool>)
execute
async fn execute(self: &Self, sender: Option<&BoxedValue>, _parameter: Option<&BoxedValue>)
Executes the save file picker using the provided sender and command parameter: does nothing when the sender is not a visual.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeSaveFilePickerBehaviorBaseImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherStyledElementBehaviorImplExtDerefUpcast<T>Upcast<SaveFilePickerBehaviorBase>StaticTypeObjectTypeSubclassable<T>StyledElementImplStyledElementBehaviorImplFerroObjectImplSaveFilePickerBehaviorBaseImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.