InvokeCommandBehaviorBase
struct · ferroui-xaml-interactivity · v0.5.0
struct InvokeCommandBehaviorBase
Invoke command behavior base class: a behavior of a Control that invokes a command,
reports whether the command can execute (can_execute_command)
and can make the control follow it (use_command_can_execute_for_is_enabled).
The class is abstract.
Members
TYPEto_refcommand_propertycan_execute_command_propertycan_execute_command_parameter_propertyuse_command_can_execute_for_is_enabled_propertycommand_parameter_propertyinput_converter_propertyinput_converter_parameter_propertyinput_converter_language_propertyconstructcommandset_commandcan_execute_commandcan_execute_command_parameterset_can_execute_command_parameteruse_command_can_execute_for_is_enabledset_use_command_can_execute_for_is_enabledcommand_parameterset_command_parameterinput_converterset_input_converterinput_converter_parameterset_input_converter_parameterinput_converter_languageset_input_converter_languagepass_event_args_to_commandset_pass_event_args_to_commandresolve_parameter
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<InvokeCommandBehaviorBase>
Returns a strong reference to this object.
command_property
fn command_property() -> &'static StyledProperty<Option<Rc<dyn ICommand>>>
Identifies the Command property.
can_execute_command_property
fn can_execute_command_property() -> &'static DirectProperty<InvokeCommandBehaviorBase, bool>
Identifies the CanExecuteCommand property.
can_execute_command_parameter_property
fn can_execute_command_parameter_property() -> &'static StyledProperty<Option<BoxedValue>>
Identifies the CanExecuteCommandParameter property.
use_command_can_execute_for_is_enabled_property
fn use_command_can_execute_for_is_enabled_property() -> &'static StyledProperty<bool>
Identifies the UseCommandCanExecuteForIsEnabled property.
command_parameter_property
fn command_parameter_property() -> &'static StyledProperty<Option<BoxedValue>>
Identifies the CommandParameter property.
input_converter_property
fn input_converter_property() -> &'static StyledProperty<Option<Rc<dyn IValueConverter>>>
Identifies the InputConverter property.
input_converter_parameter_property
fn input_converter_parameter_property() -> &'static StyledProperty<Option<BoxedValue>>
Identifies the InputConverterParameter property.
input_converter_language_property
fn input_converter_language_property() -> &'static StyledProperty<Option<String>>
Identifies the InputConverterLanguage property. The empty string of the default
value means the invariant culture.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
command
fn command(self: &Self) -> Option<Rc<dyn ICommand>>
Gets or sets the command this behavior should invoke.
set_command
fn set_command(self: &Self, value: Option<Rc<dyn ICommand>>)
can_execute_command
fn can_execute_command(self: &Self) -> bool
Gets a value indicating whether command can execute with the current
can-execute parameter.
can_execute_command_parameter
fn can_execute_command_parameter(self: &Self) -> Option<BoxedValue>
Gets or sets the parameter that is passed to the can_execute of the command. When it is
not set, command_parameter is used if it is set. It does not
change the parameter passed to the execute of the command.
set_can_execute_command_parameter
fn set_can_execute_command_parameter(self: &Self, value: Option<BoxedValue>)
use_command_can_execute_for_is_enabled
fn use_command_can_execute_for_is_enabled(self: &Self) -> bool
Gets or sets a value indicating whether the IsEnabled property of the associated control
should follow can_execute_command.
set_use_command_can_execute_for_is_enabled
fn set_use_command_can_execute_for_is_enabled(self: &Self, value: bool)
command_parameter
fn command_parameter(self: &Self) -> Option<BoxedValue>
Gets or sets the parameter that is passed to the execute of the command. If this is not
set, the parameter given to the behavior is used.
set_command_parameter
fn set_command_parameter(self: &Self, value: Option<BoxedValue>)
input_converter
fn input_converter(self: &Self) -> Option<Rc<dyn IValueConverter>>
Gets or sets the converter that is run on the parameter given to the behavior.
set_input_converter
fn set_input_converter(self: &Self, value: Option<Rc<dyn IValueConverter>>)
input_converter_parameter
fn input_converter_parameter(self: &Self) -> Option<BoxedValue>
Gets or sets the parameter that is passed to the convert of the
input_converter.
set_input_converter_parameter
fn set_input_converter_parameter(self: &Self, value: Option<BoxedValue>)
input_converter_language
fn input_converter_language(self: &Self) -> Option<String>
Gets or sets the language that is passed to the convert of the
input_converter.
set_input_converter_language
fn set_input_converter_language(self: &Self, value: Option<String>)
pass_event_args_to_command
fn pass_event_args_to_command(self: &Self) -> bool
Specifies whether the event args of the event that triggered this behavior should be passed to the command as a parameter.
set_pass_event_args_to_command
fn set_pass_event_args_to_command(self: &Self, value: bool)
resolve_parameter
fn resolve_parameter(self: &Self, parameter: Option<&BoxedValue>) -> Option<BoxedValue>
Resolves the command parameter that will be supplied to the command: the
command_parameter if it is set, else the parameter given to
the behavior converted by the input_converter, else the
parameter itself if pass_event_args_to_command.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeStyledElementBehaviorImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<InvokeCommandBehaviorBase>StaticTypeObjectTypeSubclassable<T>StyledElementImplFerroObjectImplStyledElementBehaviorImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.