FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TemplateBinding

    struct · ferroui-base · v0.5.0

    struct TemplateBinding
    

    A lightweight binding to a property of an element's templated parent.

    A binding is a mutable reference object: it is created with TemplateBinding::empty or TemplateBinding::new, configured property by property (or with the chaining with_* forms) and shared as Rc<TemplateBinding>, which converts to Rc<dyn BindingBase>. Handles compare by identity. The properties are read when the binding is instantiated on a target: changing them afterwards affects later instances only.

    View source

    Members

    snapshot_for_reload

    fn snapshot_for_reload(self: &Self) -> ::std::rc::Rc<Self>
    

    An independent description for a development transaction. Keep it only through preparation: explicit sources can own application objects.

    Source

    converter

    fn converter(self: &Self) -> Option<Rc<dyn IValueConverter>>
    

    The converter to use.

    Source

    set_converter

    fn set_converter(self: &Self, value: Option<Rc<dyn IValueConverter>>)
    

    Source

    with_converter_value

    fn with_converter_value(self: ::std::rc::Rc<Self>, value: Option<Rc<dyn IValueConverter>>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    converter_culture

    fn converter_culture(self: &Self) -> Option<CultureInfo>
    

    The culture in which to evaluate the converter. None (the default) uses the current culture.

    Source

    set_converter_culture

    fn set_converter_culture(self: &Self, value: Option<CultureInfo>)
    

    Source

    with_converter_culture

    fn with_converter_culture(self: ::std::rc::Rc<Self>, value: Option<CultureInfo>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    converter_parameter

    fn converter_parameter(self: &Self) -> Option<BoxedValue>
    

    A parameter to pass to the converter.

    Source

    set_converter_parameter

    fn set_converter_parameter(self: &Self, value: Option<BoxedValue>)
    

    Source

    with_converter_parameter

    fn with_converter_parameter(self: ::std::rc::Rc<Self>, value: Option<BoxedValue>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    mode

    fn mode(self: &Self) -> BindingMode
    

    The binding mode.

    Source

    set_mode

    fn set_mode(self: &Self, value: BindingMode)
    

    Source

    with_mode

    fn with_mode(self: ::std::rc::Rc<Self>, value: BindingMode) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    property

    fn property(self: &Self) -> Option<&'static FerroProperty>
    

    The property of the templated parent being bound; None binds to the templated parent itself.

    Source

    set_property

    fn set_property(self: &Self, value: Option<&'static FerroProperty>)
    

    Source

    with_property

    fn with_property(self: ::std::rc::Rc<Self>, value: Option<&'static FerroProperty>) -> ::std::rc::Rc<Self>
    

    The chaining form of the setter.

    Source

    empty

    fn empty() -> Rc<Self>
    

    Creates a binding without a property (the parameterless constructor).

    Source

    new

    fn new(property: &'static FerroProperty) -> Rc<Self>
    

    Creates a binding to the given property of the templated parent.

    Source

    with_converter

    fn with_converter(self: Rc<Self>, converter: Rc<dyn IValueConverter>) -> Rc<Self>
    

    The chaining form of set_converter, for a converter.

    Source

    provide_value

    fn provide_value(self: &Rc<Self>) -> Rc<dyn BindingBase>
    

    The binding itself: what the markup extension form of the binding provides.

    Source

    Trait implementations

    Availability

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