FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<SaveFilePickerBehaviorBase>
    

    Returns a strong reference to this object.

    Source

    on_pick

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

    Raises the pick event.

    Source

    default_extension_property

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

    Identifies the DefaultExtension property.

    Source

    file_type_choices_property

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

    Identifies the FileTypeChoices property.

    Source

    show_overwrite_prompt_property

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

    Identifies the ShowOverwritePrompt property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    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.

    Source

    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.

    Source

    set_default_extension

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

    Source

    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.

    Source

    set_file_type_choices

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

    Source

    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.

    Source

    set_show_overwrite_prompt

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

    Source

    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.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.