FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TreeDataTemplate

    struct · ferroui-markup-xaml · v0.5.0

    struct TreeDataTemplate
    

    A data template for hierarchical data, as markup declares it: besides the control of an item it describes where the children of the item come from.

    View source

    Members

    new

    fn new() -> Rc<Self>
    

    Source

    data_type

    fn data_type(self: &Self) -> Option<ValueType>
    

    The type of data the template is for. None matches all data.

    Source

    set_data_type

    fn set_data_type(self: &Self, value: Option<ValueType>)
    

    Source

    content

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

    The template content: deferred content built for each item.

    Source

    set_content

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

    Source

    items_source

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

    The binding that selects the children of an item. It is assigned, not applied: bind_children instantiates it on the control that shows the children.

    Source

    set_items_source

    fn set_items_source(self: &Self, value: Option<Rc<dyn BindingBase>>)
    

    Source

    match_

    fn match_(self: &Self, data: Option<&BoxedValue>) -> bool
    

    Whether the template is for data.

    Source

    bind_children

    fn bind_children(self: &Self, target: &FerroObject, target_property: &'static FerroProperty, _item: &BoxedValue) -> Rc<dyn IDisposable>
    

    Binds the children of item to target_property of target.

    Source

    build

    fn build(self: &Self, data: Option<&BoxedValue>) -> Option<Ref<Control>>
    

    Builds the control for data and gives it the data as its data context.

    Source

    from_data_template

    fn from_data_template(template: &Rc<dyn IDataTemplate>) -> Option<Rc<TreeDataTemplate>>
    

    The template behind a data template handle, if it is one of this class (the cast of the contract back to the class).

    Source

    as_data_template

    fn as_data_template(self: &Self) -> Rc<dyn IDataTemplate>
    

    The template as the data template contract.

    Source

    Trait implementations

    Availability

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