pub struct MultiBinding { /* private fields */ }Expand description
A binding that aggregates multiple bindings through a converter.
A binding is a mutable reference object: it is created with
MultiBinding::new, configured property by property (or with the
chaining with_* forms) and shared as Rc<MultiBinding>, which
converts to Rc<dyn BindingBase>. Handles compare by identity. The
properties, and the contents of the collection of child bindings, are
read when the binding is instantiated on a target: changing them
afterwards affects later instances only.
Implementations§
Source§impl MultiBinding
impl MultiBinding
Sourcepub fn bindings(&self) -> FerroList<Rc<dyn BindingBase>>
pub fn bindings(&self) -> FerroList<Rc<dyn BindingBase>>
The collection of child bindings. The list is a shared handle: children are added to the list the getter returns.
pub fn set_bindings(&self, value: FerroList<Rc<dyn BindingBase>>)
Sourcepub fn with_bindings_list(
self: Rc<Self>,
value: FerroList<Rc<dyn BindingBase>>,
) -> Rc<Self>
pub fn with_bindings_list( self: Rc<Self>, value: FerroList<Rc<dyn BindingBase>>, ) -> Rc<Self>
The chaining form of the setter.
Sourcepub fn converter(&self) -> Option<Rc<dyn IMultiValueConverter>>
pub fn converter(&self) -> Option<Rc<dyn IMultiValueConverter>>
The converter to use.
pub fn set_converter(&self, value: Option<Rc<dyn IMultiValueConverter>>)
Sourcepub fn with_converter_value(
self: Rc<Self>,
value: Option<Rc<dyn IMultiValueConverter>>,
) -> Rc<Self>
pub fn with_converter_value( self: Rc<Self>, value: Option<Rc<dyn IMultiValueConverter>>, ) -> Rc<Self>
The chaining form of the setter.
Sourcepub fn converter_culture(&self) -> Option<CultureInfo>
pub fn converter_culture(&self) -> Option<CultureInfo>
The culture in which to evaluate the converter. None (the
default) uses the current culture.
pub fn set_converter_culture(&self, value: Option<CultureInfo>)
Sourcepub fn with_converter_culture(
self: Rc<Self>,
value: Option<CultureInfo>,
) -> Rc<Self>
pub fn with_converter_culture( self: Rc<Self>, value: Option<CultureInfo>, ) -> Rc<Self>
The chaining form of the setter.
Sourcepub fn converter_parameter(&self) -> Option<BoxedValue>
pub fn converter_parameter(&self) -> Option<BoxedValue>
A parameter to pass to the converter.
pub fn set_converter_parameter(&self, value: Option<BoxedValue>)
Sourcepub fn with_converter_parameter(
self: Rc<Self>,
value: Option<BoxedValue>,
) -> Rc<Self>
pub fn with_converter_parameter( self: Rc<Self>, value: Option<BoxedValue>, ) -> Rc<Self>
The chaining form of the setter.
Sourcepub fn fallback_value(&self) -> Option<BoxedValue>
pub fn fallback_value(&self) -> Option<BoxedValue>
The value to use when the binding is unable to produce a value; the unset marker for none.
pub fn set_fallback_value(&self, value: Option<BoxedValue>)
Sourcepub fn with_fallback_value(
self: Rc<Self>,
value: Option<BoxedValue>,
) -> Rc<Self>
pub fn with_fallback_value( self: Rc<Self>, value: Option<BoxedValue>, ) -> Rc<Self>
The chaining form of the setter.
Sourcepub fn mode(&self) -> BindingMode
pub fn mode(&self) -> BindingMode
The binding mode. Only one-time and one-way are supported.
pub fn set_mode(&self, value: BindingMode)
Sourcepub fn with_mode(self: Rc<Self>, value: BindingMode) -> Rc<Self>
pub fn with_mode(self: Rc<Self>, value: BindingMode) -> Rc<Self>
The chaining form of the setter.
Sourcepub fn priority(&self) -> BindingPriority
pub fn priority(&self) -> BindingPriority
The binding priority.
pub fn set_priority(&self, value: BindingPriority)
Sourcepub fn with_priority(self: Rc<Self>, value: BindingPriority) -> Rc<Self>
pub fn with_priority(self: Rc<Self>, value: BindingPriority) -> Rc<Self>
The chaining form of the setter.
Sourcepub fn relative_source(&self) -> Option<Rc<RelativeSource>>
pub fn relative_source(&self) -> Option<Rc<RelativeSource>>
The relative source for the binding.
pub fn set_relative_source(&self, value: Option<Rc<RelativeSource>>)
Sourcepub fn with_relative_source(
self: Rc<Self>,
value: Option<Rc<RelativeSource>>,
) -> Rc<Self>
pub fn with_relative_source( self: Rc<Self>, value: Option<Rc<RelativeSource>>, ) -> Rc<Self>
The chaining form of the setter.
Sourcepub fn string_format(&self) -> Option<String>
pub fn string_format(&self) -> Option<String>
The string format.
pub fn set_string_format(&self, value: Option<String>)
Sourcepub fn with_string_format(self: Rc<Self>, value: Option<String>) -> Rc<Self>
pub fn with_string_format(self: Rc<Self>, value: Option<String>) -> Rc<Self>
The chaining form of the setter.
Sourcepub fn target_null_value(&self) -> Option<BoxedValue>
pub fn target_null_value(&self) -> Option<BoxedValue>
The value to use when the binding produces null; the unset marker for none.
pub fn set_target_null_value(&self, value: Option<BoxedValue>)
Sourcepub fn with_target_null_value(
self: Rc<Self>,
value: Option<BoxedValue>,
) -> Rc<Self>
pub fn with_target_null_value( self: Rc<Self>, value: Option<BoxedValue>, ) -> Rc<Self>
The chaining form of the setter.
Source§impl MultiBinding
impl MultiBinding
Sourcepub fn with_bindings(
self: Rc<Self>,
bindings: Vec<Rc<dyn BindingBase>>,
) -> Rc<Self>
pub fn with_bindings( self: Rc<Self>, bindings: Vec<Rc<dyn BindingBase>>, ) -> Rc<Self>
The chaining form of adding child bindings: replaces the contents of the collection of child bindings.
Sourcepub fn with_converter(
self: Rc<Self>,
converter: Rc<dyn IMultiValueConverter>,
) -> Rc<Self>
pub fn with_converter( self: Rc<Self>, converter: Rc<dyn IMultiValueConverter>, ) -> Rc<Self>
The chaining form of set_converter, for a
converter.
Trait Implementations§
Source§impl BindingBase for MultiBinding
impl BindingBase for MultiBinding
Source§fn as_any(&self) -> Option<&dyn Any>
fn as_any(&self) -> Option<&dyn Any>
as_any()?.downcast_ref::<T>()): the equivalent of is/as on the
contract. None for an implementation that does not expose itself.Source§fn create_instance(
&self,
_target: &FerroObject,
target_property: Option<&'static FerroProperty>,
_anchor: Option<&Ref<FerroObject>>,
) -> Rc<dyn BindingExpressionBase>
fn create_instance( &self, _target: &FerroObject, target_property: Option<&'static FerroProperty>, _anchor: Option<&Ref<FerroObject>>, ) -> Rc<dyn BindingExpressionBase>
Source§impl Default for MultiBinding
impl Default for MultiBinding
Source§impl MarkupTyped for MultiBinding
impl MarkupTyped for MultiBinding
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Auto Trait Implementations§
impl !Freeze for MultiBinding
impl !RefUnwindSafe for MultiBinding
impl !Send for MultiBinding
impl !Sync for MultiBinding
impl !UnwindSafe for MultiBinding
impl Unpin for MultiBinding
impl UnsafeUnpin for MultiBinding
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more