OpenFilePickerBehaviorBase
struct · ferroui-xaml-interactions · v0.5.0
struct OpenFilePickerBehaviorBase
Open file picker behavior base: a behavior that opens a file picker dialog when the deriving
class calls execute.
The picked files (Vec<StorageFileRef>) are given to the handlers of pick and,
unless a handler handled them, to the command.
The class is abstract.
Members
TYPEto_refon_pickallow_multiple_propertyfile_type_filter_propertyconstructpickallow_multipleset_allow_multiplefile_type_filterset_file_type_filterexecute
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<OpenFilePickerBehaviorBase>
Returns a strong reference to this object.
on_pick
fn on_pick(self: &Self, args: &FilePickerEventArgs)
Raises the pick event.
allow_multiple_property
fn allow_multiple_property() -> &'static StyledProperty<bool>
Identifies the AllowMultiple property.
file_type_filter_property
fn file_type_filter_property() -> &'static StyledProperty<Option<String>>
Identifies the FileTypeFilter property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
pick
fn pick(self: &Self, handler: impl Fn(&FilePickerEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
Occurs after the file picker successfully returns one or more files. Disposing the returned handle removes the handler.
allow_multiple
fn allow_multiple(self: &Self) -> bool
Gets or sets an option indicating whether the open picker allows users to select multiple files. This is a property of the object model.
set_allow_multiple
fn set_allow_multiple(self: &Self, value: bool)
file_type_filter
fn file_type_filter(self: &Self) -> Option<String>
Gets or sets the file types that the file open picker displays, as a filter
(Description|*.ext;*.other|..). This is a property of the object model.
set_file_type_filter
fn set_file_type_filter(self: &Self, value: Option<String>)
execute
async fn execute(self: &Self, sender: Option<&BoxedValue>, _parameter: Option<&BoxedValue>)
Executes the open file picker using the provided sender and command parameter: does nothing when the sender is not a visual.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeOpenFilePickerBehaviorBaseImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherStyledElementBehaviorImplExtDerefUpcast<T>Upcast<OpenFilePickerBehaviorBase>StaticTypeObjectTypeSubclassable<T>StyledElementImplStyledElementBehaviorImplFerroObjectImplOpenFilePickerBehaviorBaseImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.