FerroCreatesCommandBinding
struct · ferroui-reactiveui-controls · v0.5.0
struct FerroCreatesCommandBinding
Binds commands to the input elements of FerroUI, through a command source's Command property
or through a routed event (FerroCreatesCommandBinding).
A control that is a command source, such as a button or a menu item, is bound through its
Command and CommandParameter properties (the ones Button registers and every button-like
control and menu item shares). Any other input element is bound through a routed event that
executes the command and keeps IsEnabled in step with can_execute.
The control is given as an Rc<dyn Any> holding its handle (Ref<T>), and its type as the
TypeId of that handle; FerroObjectHandles::object_of lists the other forms.
Deviation (DEVIATIONS.md, ReactiveUI controls): the command of ReactiveUI is set on the control
through a ReactiveCommandAdapter, and the parameters through
boxed_parameter. A type is a command source when its class
registers the Command property of buttons (an instance: when it is an ICommandSource with
that property), as is ICommandSource cannot be asked of a type. The event binding has no type
of event arguments to match (the trait of the port has no TEventArgs), so the event is found
by its name alone.
Members
EVENT_TARGET_AFFINITY
const EVENT_TARGET_AFFINITY: i32
The affinity of a binding through a named routed event (EventTargetAffinity).
COMMAND_SOURCE_AFFINITY
const COMMAND_SOURCE_AFFINITY: i32
The affinity of a binding through a command source's Command property
(CommandSourceAffinity).
new
fn new() -> Self
The binder (new FerroCreatesCommandBinding()).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedClassDefaultsErasedDestructorIntoEitherDebugDefaultCloneCopyICreatesCommandBinding
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.